Excel If statment :: MrExcel Message Board


 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

If statment
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

amna77
Board Master


Joined: 10 May 2002
Posts: 136

Flag: Usa

Status: Offline

 Reply with quote  

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

Post Wed Oct 30, 2002 9:18 pm 
 View user's profile Send private message

Jac
Board Regular


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

Status: Offline

 Reply with quote  

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

Post Wed Oct 30, 2002 9:36 pm 
 View user's profile Send private message

dave_219
Board Regular


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

Status: Offline

 Reply with quote  

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

Post Wed Oct 30, 2002 9:55 pm 
 View user's profile Send private message Send e-mail

IML
MrExcel MVP


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

Status: Offline

 Reply with quote  

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

would work for you.

Post Wed Oct 30, 2002 10:04 pm 
 View user's profile Send private message Send e-mail

IML
MrExcel MVP


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

Status: Offline

 Reply with quote  

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

icon_frown.gif

Post Wed Oct 30, 2002 10:12 pm 
 View user's profile Send private message Send e-mail
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


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

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.