To reference the first letters in a cell, use the left function. The syntax is =left(cell,#). So, to return the left two letters from cell A1, you use =left(a1,2). You can put that in a cell or incorporate it into some functions.
It sounds like what you want to do is a conditional count of cells in a range that meet a certain criteria? If that is correct, you want to use the COUNTIF function, which will count values in a specified range based on a specified criteria.
The way the formula is structured is =COUNTIF(range, criteria)
=COUNTIF(A2:A7, "<=39845")
A2:A7 is the cell range
"<=39845" is less than or equal to 39845
39845 is also 2/1/2009
If you want to calculate values in a range you can do a simple SUM formula like:
=SUM(COUNTIF(B2:B33,"<=39872")-(COUNTIF(B2:B33,"<=39845")))
The logic is:
Count the number of values less than or equal to 39872 (2/28/09 - last day of Feb)
--then--
Subtract the number of values less than or equal to 39845 (2/1/09 - first day of Feb)
--
that leaves you the total number of values in February.
You may also want to look at using the Conditional Formatting command, which will allow you to apply color and bold to values that fall into or out of a specific range.
142 views
Usually answered in minutes!
×