ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional formulas (https://www.excelbanter.com/excel-worksheet-functions/249900-conditional-formulas.html)

Betty K

Conditional formulas
 
Need a formula based on a Status.

If Status is "A", it needs to calculate (T2*5)+35

If Status is "L", it needs to return 0 (zero)

If Status is "H", it needs to return 35

If Status is "P", it needs to return "NA"

Thank you in advance.

Pete_UK

Conditional formulas
 
Try this:

=IF(cell="L",0,IF(cell="H",35,IF(cell="A",T2*5+32, "NA")))

where cell is your Status. This will trap any other entries and return
"NA", in addition to Status = "P".

Hope this helps.

Pete

On Dec 2, 3:41*pm, Betty K wrote:
Need a formula based on a Status. *

If Status is "A", it needs to calculate (T2*5)+35

If Status is "L", it needs to return 0 * * (zero)

If Status is "H", it needs to return 35

If Status is "P", it needs to return "NA"

Thank you in advance.



Max

Conditional formulas
 
Assuming the various statuses (A, L, H, P) are running in S2 down
you could try this placed in say, U2:
=IF(S2="","",IF(S2="A",(T2*5)+35,VLOOKUP(S2,{"L",0 ;"H",35;"P","NA"},2,0)))
Copy U2 down as far as required. Modify to suit. Any good? hit the YES below.
--
Max
Singapore
xde
---
"Betty K" wrote:
Need a formula based on a Status.

If Status is "A", it needs to calculate (T2*5)+35

If Status is "L", it needs to return 0 (zero)

If Status is "H", it needs to return 35

If Status is "P", it needs to return "NA"

Thank you in advance.


Betty K

Conditional formulas
 
Thank you!

"Max" wrote:

Assuming the various statuses (A, L, H, P) are running in S2 down
you could try this placed in say, U2:
=IF(S2="","",IF(S2="A",(T2*5)+35,VLOOKUP(S2,{"L",0 ;"H",35;"P","NA"},2,0)))
Copy U2 down as far as required. Modify to suit. Any good? hit the YES below.
--
Max
Singapore
xde
---
"Betty K" wrote:
Need a formula based on a Status.

If Status is "A", it needs to calculate (T2*5)+35

If Status is "L", it needs to return 0 (zero)

If Status is "H", it needs to return 35

If Status is "P", it needs to return "NA"

Thank you in advance.


Max

Conditional formulas
 
Welcome, Betty
--
Max
Singapore
xde
"Betty K" wrote in message
...
Thank you!





All times are GMT +1. The time now is 01:14 PM.

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