Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default combine two if formulas into 1 megaformula

These two "if" formulas that work fine on their own. I would like
to combine them into one megaformula in one cell. I have not been
able to get it to work. Any help would be appreciated.

=IF(AND(WEEKDAY(A4)=2,D4=I1-TIME(1,0,0)),D4+TIME(1,0,0),I1)

=IF(AND(WEEKDAY(A4)<2,D4=I2-TIME(1,0,0)),D4+TIME(1,0,0),I2)

Thanks, Steve

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default combine two if formulas into 1 megaformula

What is the no-pass action, I1 or I2?

=IF(AND(WEEKDAY(A4)=2,D4=I1-TIME(1,0,0)),D4+TIME(1,0,0),IF(AND(WEEKDAY(A4)<2, D4=I2-TIME(1,0,0)),D4+TIME(1,0,0),I2))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Steve" wrote in message
ps.com...
These two "if" formulas that work fine on their own. I would like
to combine them into one megaformula in one cell. I have not been
able to get it to work. Any help would be appreciated.

=IF(AND(WEEKDAY(A4)=2,D4=I1-TIME(1,0,0)),D4+TIME(1,0,0),I1)

=IF(AND(WEEKDAY(A4)<2,D4=I2-TIME(1,0,0)),D4+TIME(1,0,0),I2)

Thanks, Steve



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 461
Default combine two if formulas into 1 megaformula

What are you trying to combine in them? If formula 1 is false, then use
formula 2... or if A4 is both formula 1 and formula 2, then D4 + Time if true?

"Steve" wrote:

These two "if" formulas that work fine on their own. I would like
to combine them into one megaformula in one cell. I have not been
able to get it to work. Any help would be appreciated.

=IF(AND(WEEKDAY(A4)=2,D4=I1-TIME(1,0,0)),D4+TIME(1,0,0),I1)

=IF(AND(WEEKDAY(A4)<2,D4=I2-TIME(1,0,0)),D4+TIME(1,0,0),I2)

Thanks, Steve


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default combine two if formulas into 1 megaformula

On May 22, 3:42 pm, AKphidelt
wrote:
What are you trying to combine in them? If formula 1 is false, then use
formula 2... or if A4 is both formula 1 and formula 2, then D4 + Time if true?



"Steve" wrote:
These two "if" formulas that work fine on their own. I would like
to combine them into one megaformula in one cell. I have not been
able to get it to work. Any help would be appreciated.


=IF(AND(WEEKDAY(A4)=2,D4=I1-TIME(1,0,0)),D4+TIME(1,0,0),I1)


=IF(AND(WEEKDAY(A4)<2,D4=I2-TIME(1,0,0)),D4+TIME(1,0,0),I2)


Thanks, Steve- Hide quoted text -


- Show quoted text -




Thanks for the help guys. I did some rethinking, changed things
around some and wrote the following formula that meets my needs

=IF(WEEKDAY(A4)=2,MAX(I1,D4+TIME(1,0,0)),MAX(I2,D4 +TIME(1,0,0)))

Steve

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
Combine Formulas Dennis1188 Excel Discussion (Misc queries) 5 March 5th 07 09:34 PM
how to combine formulas to......... gmisi Excel Worksheet Functions 5 January 13th 07 08:47 PM
MegaFormula curiosity Sige Excel Worksheet Functions 2 March 2nd 06 04:54 PM
Combine 2 formulas Steved Excel Worksheet Functions 3 August 8th 05 10:09 PM
Help combine 2 formulas into 1 Robert Excel Worksheet Functions 5 April 1st 05 08:55 AM


All times are GMT +1. The time now is 06:37 AM.

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"