ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Multiple if and Vlookup (https://www.excelbanter.com/excel-discussion-misc-queries/189959-multiple-if-vlookup.html)

Anto111

Multiple if and Vlookup
 
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

dennis

Multiple if and Vlookup
 
=IF($O$2="Monday",VLOOKUP($F$2,'[Heart Rate.xlsx]Week
1'!$C$7:$NF$372,25,False),IF($O$2="Tuesday",VLOOKU P($F$2,'[Heart
Rate.xlsx]Week
1'!$C$7:$NF$372,26,False),IF($O$2="Wednesday",VLOO KUP($F$2,'[Heart
Rate.xlsx]Week 1'!$C$7:$NF$372,27,False)))

"Anto111" wrote:

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


Anto111

Multiple if and Vlookup
 
Brilliant! Looks like its working.

Many thanks Dennis, much appreciated.

"Dennis" wrote:

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

"Anto111" wrote:

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. Valko

Multiple if and Vlookup
 
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)

--
Biff
Microsoft Excel MVP


"Anto111" wrote in message
...
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





All times are GMT +1. The time now is 01:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com