View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic[_2_] Domenic[_2_] is offline
external usenet poster
 
Posts: 265
Default Count Unique Values in 1 Column based on Date Range in another Column

How about...

C2, copied down:

=IF(A2<"",IF(YEAR(A2)=2008,B2,""),"")

Then...

=COUNTU(C2:C65536)

--
Domenic
http://www.xl-central.com

In article ,
"Brian" wrote:

Could I use 2 helper columns like this:

Helper Column 1 - An IF statement that would display a 1 in the
corresponding cells when the date in the DATE Column falls in year 2008.

Helper Column 2 - An IF statement to pull the corresponding cell value from
the ORDER NUMBER column IF Helper Column 1 equals 1.

Then I could run COUNTU on Helper Column 2.

If this is a viable scenario, what IF statement would I put in Helper Column
1?

THanks,
Brian


"Brian" wrote in message
...
Howdy All,

I'm use the CountU function to count unique values in a column and it
works great!

Now what I want to do is count the unique values in Column B which occur
between a specific date range in Column A.

Column A contains dates from 2005 through 2009.

Column B contains Order Numbers for each date.

I want to count the unique values in column B for only 2008.

Any Ideas?

Thanks,
Brian