#1   Report Post  
Posted to microsoft.public.excel.misc
Don Don is offline
external usenet poster
 
Posts: 487
Default Multiple conditions

Struggling with writing two or more "if" statements, then returning one value
if a match, another if not. Here's my worksheet:

A B C D E F
1 10 14
2
3 3-15 3-25 X
4 3-15 3-29 Y
5 3-15 3-16 3-30 Y

Column A is a planned ship date, column B is an actual ship date, column C
is the expected receipt date, column D is the shipping site.
E1 and F1 are transit days

What I need to calclulate in cell column C is:
If B3 is "", and D3 is X, then A3+E1, but if B3 is 0, then B3 +E1,
and
If B3 is "", and D3 is Y, then A3+E1, but if B3 is 0, then B3 +F1,


Thanks!!
Don
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 44
Default Multiple conditions

Hope my solution works for you, but i have some questions. Is your E1 and F1
fixed, as in no matter how long your list is in column A,B,D it will always
make use of E1 and F1? Another question I have is suppose I am looking at row
4, since B4 is "" and D4 is Y, then should it not be A4+E1 which should
return 3-25 instead of 3-29 in your example?

Try this in your C3
=IF(AND(B3<"",D3="Y"),B3+$F$1,IF(AND(B3="",D3="Y" ),A3+$E$1,IF(AND(B3="",D3="X"),A3+$E$1,B3+$E$1)))

Drag the formula down.


"Don" wrote:

Struggling with writing two or more "if" statements, then returning one value
if a match, another if not. Here's my worksheet:

A B C D E F
1 10 14
2
3 3-15 3-25 X
4 3-15 3-29 Y
5 3-15 3-16 3-30 Y

Column A is a planned ship date, column B is an actual ship date, column C
is the expected receipt date, column D is the shipping site.
E1 and F1 are transit days

What I need to calclulate in cell column C is:
If B3 is "", and D3 is X, then A3+E1, but if B3 is 0, then B3 +E1,
and
If B3 is "", and D3 is Y, then A3+E1, but if B3 is 0, then B3 +F1,


Thanks!!
Don

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Multiple conditions

Try
=IF(OR(D3="X",D3="Y"),IF(B3,B3+IF(D3="X",E1,F1),A3 +E1),"")

--
Jacob


"Don" wrote:

Struggling with writing two or more "if" statements, then returning one value
if a match, another if not. Here's my worksheet:

A B C D E F
1 10 14
2
3 3-15 3-25 X
4 3-15 3-29 Y
5 3-15 3-16 3-30 Y

Column A is a planned ship date, column B is an actual ship date, column C
is the expected receipt date, column D is the shipping site.
E1 and F1 are transit days

What I need to calclulate in cell column C is:
If B3 is "", and D3 is X, then A3+E1, but if B3 is 0, then B3 +E1,
and
If B3 is "", and D3 is Y, then A3+E1, but if B3 is 0, then B3 +F1,


Thanks!!
Don

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count for multiple conditions in multiple columns tturklsu Excel Worksheet Functions 2 July 8th 09 03:42 PM
Setting multiple conditions to return a figure from multiple cells Sapper Excel Discussion (Misc queries) 4 April 26th 09 10:33 PM
SUMPRODUCT or INDEX/MATCH for multiple conditions and multiple rec TravisB Excel Discussion (Misc queries) 21 March 16th 07 09:49 PM
Combining Text from multiple cells under multiple conditions KNS Excel Worksheet Functions 2 June 15th 05 11:00 PM
How to multiple conditions to validate more than 2 conditions to . Bhuvana Govind Excel Worksheet Functions 1 January 28th 05 07:07 PM


All times are GMT +1. The time now is 03:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"