#1   Report Post  
Posted to microsoft.public.excel.misc
LilJazzyLady
 
Posts: n/a
Default Formula Question

I have a list of numbers (ex: 1,3,5,7,9,12,13,14,15,16, etc). I need the
cell to look in another cell of a column and find one of the numbers. If it
finds it, I need it return a certain text value and if the # is not found, I
need it to return a different text value. The IF statement would be perfect
here, but my understanding is that no more than 7 IF statements can be
nested and I have more than 7. I researched the VLookup, but I don't see how
to get it to return the text values if the # is or is not found as opposed to
returning the "N/A" message. Help.

thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dominic
 
Posts: n/a
Default Formula Question

Hi JazzyLady,

Will the formula return the same value for any number found? If so, how about:

=IF(OR(A1=$C$1:$C$20),"Found","Not Found")

Where your list of values to search for is in cells C1:C20 and A1 is the
cell you want to say Found or Not Found or whatever your text response should
be.

This formula needs to be "array entered". Hold Control-Shift then hit Enter.

Does that help?

"LilJazzyLady" wrote:

I have a list of numbers (ex: 1,3,5,7,9,12,13,14,15,16, etc). I need the
cell to look in another cell of a column and find one of the numbers. If it
finds it, I need it return a certain text value and if the # is not found, I
need it to return a different text value. The IF statement would be perfect
here, but my understanding is that no more than 7 IF statements can be
nested and I have more than 7. I researched the VLookup, but I don't see how
to get it to return the text values if the # is or is not found as opposed to
returning the "N/A" message. Help.

thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
LilJazzyLady
 
Posts: n/a
Default Formula Question

Well I read the replies (Thanks by the way) but I'm not sure if that is
exactly what I need. Perhaps my post wasn't very clear and keep in mind I'm
not an Excel guru
:) I want the formula to look in B2 and if the # for that cell is a 1, I
want it to say Blue, if it finds a 2 "Red", 3 "Yellow" and so forth...

"LilJazzyLady" wrote:

I have a list of numbers (ex: 1,3,5,7,9,12,13,14,15,16, etc). I need the
cell to look in another cell of a column and find one of the numbers. If it
finds it, I need it return a certain text value and if the # is not found, I
need it to return a different text value. The IF statement would be perfect
here, but my understanding is that no more than 7 IF statements can be
nested and I have more than 7. I researched the VLookup, but I don't see how
to get it to return the text values if the # is or is not found as opposed to
returning the "N/A" message. Help.

thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
MyVeryOwnSelf
 
Posts: n/a
Default Formula Question

I want the formula to look in B2 and if the # for that cell is a 1,
I want it to say Blue, if it finds a 2 "Red", 3 "Yellow" and so
forth...


Maybe the csv file below would help.

You can save the part below "cut here" in a file
"a.csv"
(including the quotes) and double-click on the file to open it in Excel.

------------ cut here ------------
"=IF(COUNTIF(C:C,B1)=0,""Missing"",VLOOKUP(B1,C:D, 2,FALSE))",8,,
,,1,Blue
,,3,Red
,,5,Yellow
,,7,Green
,,9,Orange
,,12,Cyan
,,13,Magenta
,,14,Brown
,,15,White
,,16,Gray


  #6   Report Post  
Posted to microsoft.public.excel.misc
Dominic
 
Posts: n/a
Default Formula Question

Hi JazzyLady,

Oooh.

If I'm understanding correctly this time :-) , then you'll want to use
VLookup with a lookup table.

Here's how.

In a separate spot on the spreadsheet, or on another sheet, create your list
of values. For example:

H I
1 1 Blue
2 2 Red
3 3 Yellow

H1 = 1, I1 = Blue, H2 = 2, I2 = Red, etc etc

So your formula would look like: =VLOOKUP(B2,H1:I3,2,FALSE)

Where B2 is where the values you want to evaluate are
Where H1:I3 is your list of values and the related colors
FYI - the 2 after H1:I3 in the formula says get the value from the second
column (or color names in this case). The false means give an exact match
only.

Does that help?



"LilJazzyLady" wrote:

Well I read the replies (Thanks by the way) but I'm not sure if that is
exactly what I need. Perhaps my post wasn't very clear and keep in mind I'm
not an Excel guru
:) I want the formula to look in B2 and if the # for that cell is a 1, I
want it to say Blue, if it finds a 2 "Red", 3 "Yellow" and so forth...

"LilJazzyLady" wrote:

I have a list of numbers (ex: 1,3,5,7,9,12,13,14,15,16, etc). I need the
cell to look in another cell of a column and find one of the numbers. If it
finds it, I need it return a certain text value and if the # is not found, I
need it to return a different text value. The IF statement would be perfect
here, but my understanding is that no more than 7 IF statements can be
nested and I have more than 7. I researched the VLookup, but I don't see how
to get it to return the text values if the # is or is not found as opposed to
returning the "N/A" message. Help.

thanks

  #7   Report Post  
Posted to microsoft.public.excel.misc
Dominic
 
Posts: n/a
Default Formula Question

JazzyLady,

Just re-read your original post. You will need to change the formula to:

=if(isna(VLOOKUP(B2,H1:I3,2,FALSE)),"",VLOOKUP(B2, H1:I3,2,FALSE))

That will leave the cell with a "" (looks blank) if the number is not found
in your list. If you would like the cell to say something in particular if
the number is not found, the substitute that text for the "". (e.g., "not
found").

Does that help?



"Dominic" wrote:

Hi JazzyLady,

Oooh.

If I'm understanding correctly this time :-) , then you'll want to use
VLookup with a lookup table.

Here's how.

In a separate spot on the spreadsheet, or on another sheet, create your list
of values. For example:

H I
1 1 Blue
2 2 Red
3 3 Yellow

H1 = 1, I1 = Blue, H2 = 2, I2 = Red, etc etc

So your formula would look like: =VLOOKUP(B2,H1:I3,2,FALSE)

Where B2 is where the values you want to evaluate are
Where H1:I3 is your list of values and the related colors
FYI - the 2 after H1:I3 in the formula says get the value from the second
column (or color names in this case). The false means give an exact match
only.

Does that help?



"LilJazzyLady" wrote:

Well I read the replies (Thanks by the way) but I'm not sure if that is
exactly what I need. Perhaps my post wasn't very clear and keep in mind I'm
not an Excel guru
:) I want the formula to look in B2 and if the # for that cell is a 1, I
want it to say Blue, if it finds a 2 "Red", 3 "Yellow" and so forth...

"LilJazzyLady" wrote:

I have a list of numbers (ex: 1,3,5,7,9,12,13,14,15,16, etc). I need the
cell to look in another cell of a column and find one of the numbers. If it
finds it, I need it return a certain text value and if the # is not found, I
need it to return a different text value. The IF statement would be perfect
here, but my understanding is that no more than 7 IF statements can be
nested and I have more than 7. I researched the VLookup, but I don't see how
to get it to return the text values if the # is or is not found as opposed to
returning the "N/A" message. Help.

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
Formula Question Formula Question Excel Discussion (Misc queries) 2 April 23rd 06 12:00 AM
Excel formula question bb Excel Discussion (Misc queries) 3 April 20th 06 03:11 AM
Formula Question Marcus Feldmore Excel Worksheet Functions 1 November 11th 05 03:47 PM
I have a question regarding countif formula. Fahad Farid Ansari Excel Worksheet Functions 6 October 1st 05 11:57 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


All times are GMT +1. The time now is 06:48 AM.

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

About Us

"It's about Microsoft Excel"