If statment

amna77

Active Member
Joined
May 9, 2002
Messages
251
right now I have this formula in column D.

=IF(ISERR(AA5/AA5)=TRUE,"",AA5-10)

it just take the date value from column AA and subtract 10 days from column AA date, and puts the value in coulmn D.

Now what I want to do is, I want to look in the column B, if column B has "Assembly" value in the cell, then It should subtract only 5 days instead of 10 days, rest it sould subtract 10 days.
Any idea how I am going to play with this formula?
Thanks in advance.
Amna
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
59,396
Office Version
  1. 365
Platform
  1. Windows
Use a nested if statment (and if statement within an if statement):

=IF(ISERR(AA5/AA5)=TRUE,"",IF(AB5="ASSEMBLY",AA5-5,AA5-10))
 

eliW

Well-known Member
Joined
Mar 2, 2002
Messages
1,934
On 2002-10-30 16:19, amna77 wrote:
right now I have this formula in column D.

=IF(ISERR(AA5/AA5)=TRUE,"",AA5-10)

it just take the date value from column AA and subtract 10 days from column AA date, and puts the value in coulmn D.

Now what I want to do is, I want to look in the column B, if column B has "Assembly" value in the cell, then It should subtract only 5 days instead of 10 days, rest it sould subtract 10 days.
Any idea how I am going to play with this formula?
Thanks in advance.
Amna
Try:

IF(LEN(AA5)=0,"",IF(B5="Assembly",AA5-5,AA5-10))

Eli
This message was edited by eliW on 2002-10-30 16:31
 

Dave Patton

Well-known Member
Joined
Feb 15, 2002
Messages
4,960
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
On 2002-10-30 16:19, amna77 wrote:
right now I have this formula in column D.

=IF(ISERR(AA5/AA5)=TRUE,"",AA5-10)

it just take the date value from column AA and subtract 10 days from column AA date, and puts the value in coulmn D.

Now what I want to do is, I want to look in the column B, if column B has "Assembly" value in the cell, then It should subtract only 5 days instead of 10 days, rest it sould subtract 10 days.
Any idea how I am going to play with this formula?
Thanks in advance.
Amna

try

=IF(AND(B5="Assembly",ISNUMBER(AA5)),AA5-5,IF(ISNUMBER(AA5),AA5-10,""))
 

Forum statistics

Threads
1,143,641
Messages
5,719,988
Members
422,257
Latest member
Calion

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
Top