Add a condition to a formula

Brew

Well-known Member
Joined
Sep 29, 2003
Messages
1,569
How do I update the following formula if AL48=00, then answer will be 08 not -02
=TEXT(AL48-2,"00")
How do I update the following formula if AL49=00, then answer will be 09
not -01
=TEXT(AL49-1,"00")

Also, if AL48=01 and =TEXT(AL48-2,"00") is used, then the answer is 09, not -01
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
No gentlemen, that not what I am looking for in either case

I want the value to be two less than AL48, but when Al48=00
instead of it giving a negative answer, it should be 08, or if AL48=01, instead of it giving a -01 answer, it should be 09

My numerical scale is:

08, 09, 00, 01 ,02, 03 etc

SO if someone can help me fix the syntax problem in this one, I think we will have the solution
=IF(AL48="00","08",TEXT(AL48-2,"00")), IF(AL48="01","09",TEXT(AL48-2,"01"))

example

if AL48=00, then ans=08
If AL48=01, then ans=09
if AL48=02, then ans=00
If AL48=03, then ans=01
 
Upvote 0
Brew said:
No fairwind, that not what I am looking for:

I want the value to be two less than AL48, but when Al48=00
instead of it giving a negative answer, it should be 08, or if AL48=01, instead of it giving a -01 answer, it should be 09

My numerical scale is:

08, 09, 00, 01 ,02, etc

SO if someone can help me fix the syntax problem in this one, I think we will have the solution
=IF(AL48="00","08",TEXT(AL48-2,"00")), IF(AL48="01","09",TEXT(AL48-2,"01"))

=TEXT(IF(--AL48 < 2,AL48+10,AL48)-2,"00")
 
Upvote 0
Cannot see why Aladins should not work, however this is the syntax you are asking for:

=IF(AL48="00","08",IF(AL48="01","09",TEXT(AL48-2,"00")))
 
Upvote 0
Thanks Fairwinds and Aladin,
The last formula you sent does work fine
Thanks!!!
 
Upvote 0
How do I add another condition to this formula?:

=TEXT(IF(--AL48 < 1,AL48+10,AL48)+2,"00")
so that,
numerical scale = 98, 99, 00, 01
therefore,

if AL48=99, then answer would be "01"
if AL48=98, then answer would be "00"

Thanks
 
Upvote 0
Sorry to jump in so late in the discussion, but would the following help:

=TEXT(MOD(AL48+2,100),"00")
 
Upvote 0

Forum statistics

Threads
1,215,473
Messages
6,125,012
Members
449,204
Latest member
tungnmqn90

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top