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 calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Thanks Ken2step , but
How do I include 01 in this formula also?
01 would equal 09, while 00 equal 08
 
Upvote 0
The following formula meets all of my conditions, unless Al49 is 00 or 01
=TEXT(AL49-1,"00") .

2 less than 00=08
1 less than 00=09

2less than 01=09
1 less than 01=00

Therefore, show me how do I add
=if(AL49="00","08",Text(AL49-2,"00")) or if Al49=01 then, 09
 
Upvote 0
I figured this one out. It's the following formula:
=IF(AL48="00","08",IF(AL48="01","09",TEXT(AL48-2,"00")))
Thanks for your help
 
Upvote 0
How do I fix this formula to meet my conditions:

=IF(AL48="00","08",TEXT(AL48-2,"00"))or IF(AL48="01","09",TEXT(AL48-2,"01"))
 
Upvote 0

Forum statistics

Threads
1,214,808
Messages
6,121,686
Members
449,048
Latest member
81jamesacct

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