Excel If statment :: MrExcel Message Board
 Search   Memberlist   Usergroups   Favorites   Statistics   Register

 If statment

amna77
Board Master

Joined: 10 May 2002
Posts: 136

Flag:

Status: Offline

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?
Amna

Wed Oct 30, 2002 9:18 pm

Jac
Board Regular

Joined: 06 May 2002
Posts: 33
Location: Melbourne, Australia

Status: Offline

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))

Wed Oct 30, 2002 9:36 pm

dave_219
Board Regular

Joined: 23 Oct 2002
Posts: 13
Location: david sasson

Status: Offline

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

Wed Oct 30, 2002 9:55 pm

IML
MrExcel MVP

Joined: 16 Feb 2002
Posts: 1344
Location: Denver, CO
Flag:

Status: Offline

Perhaps
=IF(LEN(AA5),(AA5-5)-(B5<>"Assembly")*5,"")

would work for you.

Wed Oct 30, 2002 10:04 pm

IML
MrExcel MVP

Joined: 16 Feb 2002
Posts: 1344
Location: Denver, CO
Flag:

Status: Offline

Just noticed this is a duplicate of
http://216.92.17.166/board/viewtopic.php?topic=27335&forum=2&3

Wed Oct 30, 2002 10:12 pm
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Forum Jump:
 Jump to: Select a forum MrExcel Forums----------------Excel QuestionsInternational forumMicrosoft AccessTechnical issues and Future development Holy Macro! Books----------------Holy Macro! Products The Lounge----------------Max Cells Lounge Announcements----------------About This BoardHall of Fame WinnersTest Here

Page 1 of 1

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forum