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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Jac

New Member
Joined
May 5, 2002
Messages
37
I would have a play around with a nested IF formula as below:
=IF(ISERR(AA5/AA5)=TRUE,"",IF(B5="Assembly",AA5-5,AA5-10))
 

dave_219

New Member
Joined
Oct 22, 2002
Messages
17
Hi this is David, try this:

=IF(ISERR(AA5/AA5)=TRUE;"";IF(B5>0;AA5-5;IF(B5=0;AA5-10;0)))
This is an arrey so don't forget to press Ctrl Shift Enter.
What it does is it checks to see if there is any value in cell B5 if it does the it -5 if there is nothing in cell B5 then it -10.
Hope this is what you need

later
david
 

IML

MrExcel MVP
Joined
Feb 15, 2002
Messages
1,743
Perhaps
=IF(LEN(AA5),(AA5-5)-(B5<>"Assembly")*5,"")

would work for you.
 

Forum statistics

Threads
1,144,150
Messages
5,722,797
Members
422,459
Latest member
Chriselff

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