ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   "IF" function query (https://www.excelbanter.com/excel-worksheet-functions/224620-if-function-query.html)

nitrofueled

"IF" function query
 
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...

Jellifish

"IF" function query
 
=IF(D3="four",4,IF(D3="five",5,IF(D3="six",6,8)))

"nitrofueled" wrote in message
...
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...




Luke M

"IF" function query
 
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.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"nitrofueled" wrote:

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...


Francis

"IF" function query
 
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










"nitrofueled" wrote:

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...


Francis

"IF" function query
 
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










"Luke M" wrote:

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.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"nitrofueled" wrote:

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...


nitrofueled

"IF" function query
 
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.

"Luke M" wrote:

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.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"nitrofueled" wrote:

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...



All times are GMT +1. The time now is 07:49 AM.

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