Search : in
By :

Excel Formula Counting Diff IF

Last answer on Nov 6, 2009 3:01:01 pm GMT working123, on Oct 20, 2009 4:18:35 pm BST 
 Report this message to moderators

Hello,
I am trying to write a formula to count only certain dates of events in colum A but only IF column F meets certain criteria. I have a formula to count the differenence already in column A for another number I need, but I'm having difficulty adding to the formula to meet the 3rd critera.
This is my working formula to count events from the beginning of the year to today's date (Cell D2 is a formula for today's date):

=COUNTIF(A5:A106,"<=" & +D2)-COUNTIF(A5:A106,"<" & DATE(2009,1,1))

Now I need to make it count these same events only if they have "AM" in column F.

Here's what I have been trying with no luck...

=COUNT(IF(A5:A106,"<="&+D2)-IF(A5:A106,"<"&DATE(2009,1,1))-COUNTIF(F5:F106,"AM"))

Please Help!

Configuration: Windows XP Internet Explorer 7.0

Best answers for « Excel Formula Counting Diff IF » in :
Basic Excel Formulas ShowBasic Excel Formulas Below are some basic formulas for Microsoft excel: Basic formula : ADDITION cell A1 to A10 = sum (A1: A10) AVERAGE cell A1 to A10 = average (A1: A10) MAXIMUM cell A1 to A10 = max (A1: A10) MINIMUM...
Avoid duplicates in Excel ShowAvoid duplicates in Excel In order to avoid duplication when encoding in a column from an excel sheet: take the conditional format on the first cell under the headings (eg A2) choose the following formula:...
Colouring cells on conditions ShowColouring cells on conditions There are many pratical functions under Excel which is not commonly used. Example: If you wish a cell automatically turns red (or other formatting border, frame etc) under one condition: a result, a...

1

Excelguru, on Oct 21, 2009 12:23:33 pm BST

Try this

=sum(COUNTIF(A5:A106,"<=" & +D2)*COUNTIF(F5:F106,"AM"))-sum(COUNTIF(A5:A106,"<" & DATE(2009,1,1)) *COUNTIF(F5:F106,"AM"))
Press CTRL +SHIFT+ENTER To enter the formula
A wise man once said, 'I complained that I had no shoes until I met a man who had no feet.'
I am interested in financial Modelling and custom excel development with excel macros.

Reply to Excelguru

2

TPus17, on Nov 2, 2009 6:23:43 pm GMT

I'm trying to write a formula where I can add the values found in non-sequential cells in a row based on if the value in the previous cell in the same row meets certain criteria. I'm fairly new at all of this so any and all help is greatly appreciated!

Reply to TPus17

3

Trowa, on Nov 6, 2009 12:23:29 pm GMT

Try sumif

Reply to Trowa

4

 TPus17, on Nov 6, 2009 3:01:01 pm GMT

I tried sumif and it didn't work right. Thanks though.

Reply to TPus17