"IF" function query

N

nitrofueled

I am trying to create a formula within a cell that returns a number (4,5,6,
or 8) based on a series of text entries. The text series are in seperate
columns that have been named (four, five, six and eight) on a seperate sheet.
So far I have written this program with no success:
=IF(D3=four,"4",IF(D3=five,"5",IF(D3=six,"6","8"))). Any help would be
greatly appreciated...
 
L

Luke M

Your formula is correct, simply enter it as an array, not a regular formula.

Click on cell w/ formula, press F2, the press Ctrl+Shift+Enter. You should
now see the curly brackets around your formula.

Note that your formula doesn't actually check if a value is in field
"eight", it just assumes it is. If D3 contains a text not found anywhere, you
current formula would still return 8.
 
F

francis

change your formula to
=IF(D3="four",4,IF(D3="five",5,IF(D3="six",6,IF(D3="eight",8,""))))

Pls note that your formula does not check if "eight" is found, its assume that
it is even if it is blank and return 8.
I have adjusted the formula to check if D3 have a "eight", if not it return
a blank
--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked


Thank You

cheers, francis
 
F

francis

Hi Luke

I have tested this as array but doesn't seem to work.
You may want to double check on it again.

--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked


Thank You

cheers, francis
 
N

nitrofueled

Thanks for the help. It worked great!!! Would you happen to know how to get
the program to start from the beginning every time a different entry is
selected in cell D3? Currently the program works initially, but returns the
condition if false after another entry is selected in cell D3.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top