ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   "in" function??? (https://www.excelbanter.com/excel-worksheet-functions/194522-function.html)

ChrisP

"in" function???
 
I have a cell that could be one of 2 values, if it's one value I want to do a
vlookup and get the associated info from another tab (this I can do). My
problem is that if one of the other 2 values are chosen I would bring back
the same value from a different tab. Can I do something like an IN statement?

For example:

if (a1 in ("exp", "cap"), .....

Thanks!

Bernard Liengme

"in" function???
 
Without knowing all your details:
=IF(A1="exp",VLOOKUP(B1,Sheet1!A1:C100,2,0),
IF(A1="cap",VLOOKUP(B1,Sheet2!A1:C100,2,0), "")

Make the Sheet1!A1:C100 part by 'point and drag' on the correct range in
your workbook

(Please, they are "worksheets", "Tabs" are the dohickies -that's the high
tech word- you click to open worksheets. If you use the wrong word, Help
will not give you much joy)

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"ChrisP" wrote in message
...
I have a cell that could be one of 2 values, if it's one value I want to do
a
vlookup and get the associated info from another tab (this I can do). My
problem is that if one of the other 2 values are chosen I would bring back
the same value from a different tab. Can I do something like an IN
statement?

For example:

if (a1 in ("exp", "cap"), .....

Thanks!




PCLIVE

"in" function???
 
=IF(A1="exp",VLOOKUP(vlookup Value,table array,column index),formula if
"cap" is chosen)

--

"ChrisP" wrote in message
...
I have a cell that could be one of 2 values, if it's one value I want to do
a
vlookup and get the associated info from another tab (this I can do). My
problem is that if one of the other 2 values are chosen I would bring back
the same value from a different tab. Can I do something like an IN
statement?

For example:

if (a1 in ("exp", "cap"), .....

Thanks!





All times are GMT +1. The time now is 03:19 PM.

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