lookup question

  • Thread starter Thread starter cmf9903
  • Start date Start date
C

cmf9903

I am having trouble figuring out how to look something up in a list
based on conditions. For example I have:

Store # State Open Date
1 ND 1/2/03
2 SD 2/4/03

in a list with approx 350 records which all have this same info. I
need to create another table that shows which stores opened in which
state in each month. So, I need to say if the open date is in January
(or between Jan 1 & Jan 31) & the state is ND then I need the cell the
formula is in to read 1. Basically if the open date & state meet my
specifications then I want it to look up & input the corresponding
store #. I'm guessing that I will need some combination of IF &
VLOOKUP functions but I'm having a hard time figuring out what will
work. Any suggestions?
 
With your data in A2:C351, month number (1 for Jan, 2 for Feb, etc.) in
D1, State designation in E1,

=SUMPRODUCT((MONTH(c2:c351)=D1)*(B2:B351=E1)*(A2:A351))

Alan Beban
 
Back
Top