VLOOKUP with MONTH/YEAR

  • Thread starter Thread starter lunker55
  • Start date Start date
L

lunker55

I don't know how to use MONTH and YEAR with VLOOKUP:

=VLOOKUP(((YEAR(Sheet1!A7:A23)=(A3))*(MONTH(Sheet1!A7:A23)=(H1))),Sheet1!A7:
BP26,38,0)


This formula works if I replace
((YEAR(Sheet1!A7:A23)=(A3))*(MONTH(Sheet1!A7:A23)=(H1)) with (B1) which has
1 mar/04 in the cell.


A3 has the year in it (2004)
H1 has the month (1-12)

Am I close?

Joe
 
I don't think so, maybe you could describe what you are trying to do
instead, why are you multiplying?
Maybe it is something like this that you want


=INDEX(AL7:AL23,MATCH(DATE(A3,H1,1),DATE(YEAR(A7:A23),MONTH(A7:A23),1),0))

entered with ctrl + shift & enter
 
Hi

When you want to return a NUMERIC value from some column, which corresponds
to some date in column A, then when there is a single row for every month,
and the value to be returned in column X, you can use the formula p.e.

=SUMPRODUCT((YEAR(Sheet1!A7:A23)=A3)*(MONTH(Sheet1!A7:A23)=H1)*(Sheet1!X7:X2
3))
 
Thanks Arvi,
It took me a long time to get it working. There was a cell with a blank
space giving me the #VALUE! error.
Thanks for the formula. I was going about it all wrong.

Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top