#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 54
Default "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!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default "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!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default "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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
function to return day in the form "Monday", "Tuesday" etc given . MTro Excel Worksheet Functions 2 October 3rd 07 09:49 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 07:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"