Multiple if and Vlookup

A

Anto111

Hi guys,

I am using the formula below to lookup a person in a table when the persons'
name is entered in box F2 and return a specific value relating to that person
on a particular day when the specified day is entered in cell O2.

=IF($O$2="Monday",VLOOKUP($F$2,'[Heart Rate.xlsx]Week
1'!$C$7:$NF$372,25,IF($O$2="Tuesday",VLOOKUP($F$2,'[Heart Rate.xlsx]Week
1'!$C$7:$NF$372,26,IF($O$2="Wednesday",VLOOKUP($F$2,'[Heart Rate.xlsx]Week
1'!$C$7:$NF$372,27))))))

This works fine when I enter Monday in cell O2 but returns FALSE when I
enter Tuesday or Wednesday.

Could anyone suggest a way to enhance the formula to make it work?

Kind regards,

Ant
 
D

Dennis

=IF($O$2="Monday",VLOOKUP($F$2,'[Heart Rate.xlsx]Week
1'!$C$7:$NF$372,25,False),IF($O$2="Tuesday",VLOOKUP($F$2,'[Heart
Rate.xlsx]Week
1'!$C$7:$NF$372,26,False),IF($O$2="Wednesday",VLOOKUP($F$2,'[Heart
Rate.xlsx]Week 1'!$C$7:$NF$372,27,False)))
 
A

Anto111

Brilliant! Looks like its working.

Many thanks Dennis, much appreciated.

Dennis said:
=IF($O$2="Monday",VLOOKUP($F$2,'[Heart Rate.xlsx]Week
1'!$C$7:$NF$372,25,False),IF($O$2="Tuesday",VLOOKUP($F$2,'[Heart
Rate.xlsx]Week
1'!$C$7:$NF$372,26,False),IF($O$2="Wednesday",VLOOKUP($F$2,'[Heart
Rate.xlsx]Week 1'!$C$7:$NF$372,27,False)))

Anto111 said:
Hi guys,

I am using the formula below to lookup a person in a table when the persons'
name is entered in box F2 and return a specific value relating to that person
on a particular day when the specified day is entered in cell O2.

=IF($O$2="Monday",VLOOKUP($F$2,'[Heart Rate.xlsx]Week
1'!$C$7:$NF$372,25,IF($O$2="Tuesday",VLOOKUP($F$2,'[Heart Rate.xlsx]Week
1'!$C$7:$NF$372,26,IF($O$2="Wednesday",VLOOKUP($F$2,'[Heart Rate.xlsx]Week
1'!$C$7:$NF$372,27))))))

This works fine when I enter Monday in cell O2 but returns FALSE when I
enter Tuesday or Wednesday.

Could anyone suggest a way to enhance the formula to make it work?

Kind regards,

Ant
 
T

T. Valko

If you're only wanting to test for Mon, Tue and Wed...

=VLOOKUP($F$2,'[Heart Rate.xlsx]Week
1'!$C$7:$NF$372,24+MATCH($O$2,{"Monday","Tuesday","Wednesday"},0),0)
 

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