ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   vlookups and if statement (https://www.excelbanter.com/excel-worksheet-functions/200345-vlookups-if-statement.html)

excelrookie

vlookups and if statement
 
I am doing a simple vlookup, but need to search another column and if I find
a match change the lookup result.
example
vlookup(a2,tab1a2:b50,3). if A3 = 25, then I need to change the lookup value
to reflect the if statement result.
Any help would be appreciated

smartin

vlookups and if statement
 
excelrookie wrote:
I am doing a simple vlookup, but need to search another column and if I find
a match change the lookup result.
example
vlookup(a2,tab1a2:b50,3). if A3 = 25, then I need to change the lookup value
to reflect the if statement result.
Any help would be appreciated


What IF statement, and what is A3?

=iF(vlookup(a2,tab1a2:b50,3)=25, [alternate lookup], [something else])

?

Bob Bridges[_2_]

vlookups and if statement
 
While you're answering smartin's very relevant questions, allow me to point
out that the sample formula you typed out for us won't work. Even assumping
an extra bang ("!"), like this:

VLOOKUP(A2,Tab1!A2:B50,3)

....the third argument says to take a value from the third column, yet you
specified only a two-column table. In my version of Excel, at least, this
returns the #REF error.

--- "smartin" wrote:
What IF statement, and what is A3?

=iF(vlookup(a2,tab1a2:b50,3)=25, [alternate lookup], [something else])

--- excelrookie wrote:
I am doing a simple vlookup, but need to search another column and if I find
a match change the lookup result. example:

vlookup(a2,tab1a2:b50,3).

if A3 = 25, then I need to change the lookup value to reflect the if
statement result.


smartin

vlookups and if statement
 
Bob Bridges wrote:
While you're answering smartin's very relevant questions, allow me to point
out that the sample formula you typed out for us won't work. Even assumping
an extra bang ("!"), like this:

VLOOKUP(A2,Tab1!A2:B50,3)

...the third argument says to take a value from the third column, yet you
specified only a two-column table. In my version of Excel, at least, this
returns the #REF error.


Bob, Thanks for looking over my overlooking the obvious (^:


All times are GMT +1. The time now is 11:15 PM.

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