add IF stmt to a Count unique?

dbwiz

Active Member
Joined
Nov 20, 2007
Messages
275
Col H containes text in some of the rows, Col I there are dates in all the rows. I need to count the unique dates in Col I - IF Col H is not blank.

This is what I have for Col I (which has to have CTRL-Shift-Enter after pasting to get it to put {} around it to "take." How can I add an if statement to this - or is there a simpler way?

=SUM(IF(LEN(A2:A4970),1/COUNTIF(A2:A4970,A2:A4970)))
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(FREQUENCY(IF($I$2:$I$4970<>"",IF(1-($H$2:$H$4970=""),
    MATCH($I$2:$I$4970,$I$2:$I$4970,0))),
       ROW($I$2:$I$4970)-ROW($I$2)+1),1))
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,839
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top