MAX returns correct column, but row -1?

R

Ryan

I want to look up the closest completed Week Ending Date & return the
value of remaining Vacation Time from column I, for the appropriate
week ending date.

'WEEKDAY' = Week Ending Dates for 2007
I12:I63 = Vacation Time Remaining

I can't figure out why I continue to get an #N/A error with this
formula:
{=VLOOKUP(MAX(WEEKDAY<=TODAY()),I12:I63,1,FALSE)}


Or why it returns the appropriate column, minus 1 row, when a value is
entered into column H (Vacation Used for Week).
{=MAX(IF(WEEKDAY<=TODAY(),I12:I63))}

Example:
{=MAX(IF(WEEKDAY<=TODAY(),I12:I63))} returns 20.17 hours remaining if
I didn't use any vacation time that week (column H).
However, I used '10 hours' of vacation that week (column H), the
formula returns the value in the cell above 20.17.

Any thoughts? Either formula would work, I believe, if I could figure
out

Thanks,
Ryan
 
V

Vasant Nanavati

You are using a cannon to kill a fly. Even worse, you missed. <g>

Try something simple like:

=INDEX(I12:I63,MATCH(TODAY(),WEEKDAY,1))
________________________________________________________________________
 
R

Ryan

All it takes sometimes is a new set of eyes.

Thanks for your help, this works awesome! :)
 
V

Vasant Nanavati

You're most welcome!
_________________________________________________________________________
 

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

Top