close

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 quot;N/Aquot; message. Help.

thanks

Hi JazzyLady,

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

=IF(OR(A1=$C$1:$C$20),quot;Foundquot;,quot;Not Foundquot;)

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 quot;array enteredquot;. Hold Control-Shift then hit Enter.

Does that help?

quot;LilJazzyLadyquot; wrote:

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

assuming you have a table with your list of numbers and respective texts
try something like =IF(ISNA(VLOOKUP(A1,C13,2,FALSE)),quot;not found
textquot;,VLOOKUP(A1,C13,2,FALSE))
substitute your table range or name for c1:d3,and A1 is the cell where you
are looking at the number
--
paul

remove nospam for email addy!
quot;LilJazzyLadyquot; wrote:

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

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 quot;Redquot;, 3 quot;Yellowquot; and so forth...

quot;LilJazzyLadyquot; wrote:

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

gt; I want the formula to look in B2 and if the # for that cell is a 1,
gt; I want it to say Blue, if it finds a 2 quot;Redquot;, 3 quot;Yellowquot; and so
gt; forth...

Maybe the csv file below would help.

You can save the part below quot;cut herequot; in a file
quot;a.csvquot;
(including the quotes) and double-click on the file to open it in Excel.

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

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?
quot;LilJazzyLadyquot; wrote:

gt; Well I read the replies (Thanks by the way) but I'm not sure if that is
gt; exactly what I need. Perhaps my post wasn't very clear and keep in mind I'm
gt; not an Excel guru
gt; I want the formula to look in B2 and if the # for that cell is a 1, I
gt; want it to say Blue, if it finds a 2 quot;Redquot;, 3 quot;Yellowquot; and so forth...
gt;
gt; quot;LilJazzyLadyquot; wrote:
gt;
gt; gt; I have a list of numbers (ex: 1,3,5,7,9,12,13,14,15,16, etc). I need the
gt; gt; cell to look in another cell of a column and find one of the numbers. If it
gt; gt; finds it, I need it return a certain text value and if the # is not found, I
gt; gt; need it to return a different text value. The IF statement would be perfect
gt; gt; here, but my understanding is that no more than 7 IF statements can be
gt; gt; nested and I have more than 7. I researched the VLookup, but I don't see how
gt; gt; to get it to return the text values if the # is or is not found as opposed to
gt; gt; returning the quot;N/Aquot; message. Help.
gt; gt;
gt; gt; thanks

JazzyLady,

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

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

That will leave the cell with a quot;quot; (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 quot;quot;. (e.g., quot;not
foundquot;).

Does that help?
quot;Dominicquot; wrote:

gt; Hi JazzyLady,
gt;
gt; Oooh.
gt;
gt; If I'm understanding correctly this time :-) , then you'll want to use
gt; VLookup with a lookup table.
gt;
gt; Here's how.
gt;
gt; In a separate spot on the spreadsheet, or on another sheet, create your list
gt; of values. For example:
gt;
gt; H I
gt; 1 1 Blue
gt; 2 2 Red
gt; 3 3 Yellow
gt;
gt; H1 = 1, I1 = Blue, H2 = 2, I2 = Red, etc etc
gt;
gt; So your formula would look like: =VLOOKUP(B2,H1:I3,2,FALSE)
gt;
gt; Where B2 is where the values you want to evaluate are
gt; Where H1:I3 is your list of values and the related colors
gt; FYI - the 2 after H1:I3 in the formula says get the value from the second
gt; column (or color names in this case). The false means give an exact match
gt; only.
gt;
gt; Does that help?
gt;
gt;
gt;
gt; quot;LilJazzyLadyquot; wrote:
gt;
gt; gt; Well I read the replies (Thanks by the way) but I'm not sure if that is
gt; gt; exactly what I need. Perhaps my post wasn't very clear and keep in mind I'm
gt; gt; not an Excel guru
gt; gt; I want the formula to look in B2 and if the # for that cell is a 1, I
gt; gt; want it to say Blue, if it finds a 2 quot;Redquot;, 3 quot;Yellowquot; and so forth...
gt; gt;
gt; gt; quot;LilJazzyLadyquot; wrote:
gt; gt;
gt; gt; gt; I have a list of numbers (ex: 1,3,5,7,9,12,13,14,15,16, etc). I need the
gt; gt; gt; cell to look in another cell of a column and find one of the numbers. If it
gt; gt; gt; finds it, I need it return a certain text value and if the # is not found, I
gt; gt; gt; need it to return a different text value. The IF statement would be perfect
gt; gt; gt; here, but my understanding is that no more than 7 IF statements can be
gt; gt; gt; nested and I have more than 7. I researched the VLookup, but I don't see how
gt; gt; gt; to get it to return the text values if the # is or is not found as opposed to
gt; gt; gt; returning the quot;N/Aquot; message. Help.
gt; gt; gt;
gt; gt; gt; thanks

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()