View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Pappa Pappa is offline
external usenet poster
 
Posts: 4
Default Lookup date range row 1 and count if leave in same column on r

Thanks Max. Your solution not only works but is concise...simple yet effective.
I really appreciate the help.
--
Cheers
Pappa Smurf


"Max" wrote:

Real dates are assumed in B1:Z1 with corresponding data ("L"s, etc) in B2:Z2
down
Date range desired: Startdate is specified in AA1, Enddate in AA2 (these 2
dates must be real dates)
In AA2:
=SUMPRODUCT(($B$1:$Z$1=$AA$1)*($B$1:$Z$1<=$AB$1)* (B2:Z2="L"))
Copy down to return the required counts of "L"

If data within B2:Z2 down are numbers (instead of the letter L)
and you want to sum up these numbers instead for the specified date range,
use in AA2, copied down:
=SUMPRODUCT(($B$1:$Z$1=$AA$1)*($B$1:$Z$1<=$AB$1), B2:Z2)

Above any good? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Pappa" wrote:
Sorry I mucked up and meant row 1 and 2 not A & B.

Ms-Exl-Learner - The count you suggested will count the L's without
reference to the specified date range