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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
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))
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,569
Messages
6,120,286
Members
448,953
Latest member
Dutchie_1

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