#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default If fomula

Hello,

I want to combine the 2 formulas using the IF function. Each scenario has
its own formula but I want to integrate them into one formula. I'll
appreciate if you could do it for me.





=INT((D13-C13)*24)+((D14-C14)*24)
=INT((H14-G13)*24)

Thanks,


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default If fomula

Have you looked in the help index for IF

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Joe Perez" wrote in message
...
Hello,

I want to combine the 2 formulas using the IF function. Each scenario has
its own formula but I want to integrate them into one formula. I'll
appreciate if you could do it for me.





=INT((D13-C13)*24)+((D14-C14)*24)
=INT((H14-G13)*24)

Thanks,


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default If fomula

Yes, but had no luck.

"Don Guillett" wrote in message
...
Have you looked in the help index for IF

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Joe Perez" wrote in message
...
Hello,

I want to combine the 2 formulas using the IF function. Each scenario
has its own formula but I want to integrate them into one formula. I'll
appreciate if you could do it for me.





=INT((D13-C13)*24)+((D14-C14)*24)
=INT((H14-G13)*24)

Thanks,




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default If fomula


"Joe Perez" wrote:
I want to combine the 2 formulas using the IF function.


Needless to say, you would get a more helpful response if you explained the
condition for selecting one formula or the other. The following may or may
not be helpful.

The general form of the IF expression might be:

=if(condition, INT((D13-C13)*24)+(D14-C14)*24, INT((H14-G13)*24))

What is "condition"? That's for you to answer. It might be something like:

=if(A1="two shifts", INT((D13-C13)*24)+(D14-C14)*24, INT((H14-G13)*24))


By the way, I suspect the first of your original formulas is incorrect. I
suspect it should be one of the following, depending on your intention:

1. INT((D13-C13)*24) + INT((D14-C14)*24)

2. INT((D13-C13)*24 + (D14-C14)*24)

3. INT((D13-C13 + (D14-C14))*24)

In #1, two elapsed times are truncated to hours and added; for example, 1.6
+ 2.7 = 3.

In #2, two elapsed times in hours and fractions of an hour are added, then
truncated; for example, 1.6 + 2.7 = 4.

#3 should be equivalent to #2, but it is more efficient. "(D14-C14)" could
be written simply as "D14-C14" without parentheses if D14 and C14 contain
only time (e.g. hh:mm) instead of date and time (e.g. m/d/yyyy h:mm).


----- original message -----

"Joe Perez" wrote in message
...
Hello,

I want to combine the 2 formulas using the IF function. Each scenario has
its own formula but I want to integrate them into one formula. I'll
appreciate if you could do it for me.

=INT((D13-C13)*24)+((D14-C14)*24)
=INT((H14-G13)*24)

Thanks,


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default If fomula

=if(a1="hi there",INT((D13-C13)*24)+((D14-C14)*24),INT((H14-G13)*24))

This combines the two into a single formula, but I doubt that this is what you
want.

Joe Perez wrote:

Hello,

I want to combine the 2 formulas using the IF function. Each scenario has
its own formula but I want to integrate them into one formula. I'll
appreciate if you could do it for me.

=INT((D13-C13)*24)+((D14-C14)*24)
=INT((H14-G13)*24)

Thanks,


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default If fomula

so, here's an example of what i'm shooting for..

"JoeU2004" wrote in message
...

"Joe Perez" wrote:
I want to combine the 2 formulas using the IF function.


Needless to say, you would get a more helpful response if you explained
the
condition for selecting one formula or the other. The following may or
may
not be helpful.

The general form of the IF expression might be:

=if(condition, INT((D13-C13)*24)+(D14-C14)*24, INT((H14-G13)*24))

What is "condition"? That's for you to answer. It might be something
like:

=if(A1="two shifts", INT((D13-C13)*24)+(D14-C14)*24, INT((H14-G13)*24))


By the way, I suspect the first of your original formulas is incorrect. I
suspect it should be one of the following, depending on your intention:

1. INT((D13-C13)*24) + INT((D14-C14)*24)

2. INT((D13-C13)*24 + (D14-C14)*24)

3. INT((D13-C13 + (D14-C14))*24)

In #1, two elapsed times are truncated to hours and added; for example,
1.6
+ 2.7 = 3.

In #2, two elapsed times in hours and fractions of an hour are added, then
truncated; for example, 1.6 + 2.7 = 4.

#3 should be equivalent to #2, but it is more efficient. "(D14-C14)"
could
be written simply as "D14-C14" without parentheses if D14 and C14 contain
only time (e.g. hh:mm) instead of date and time (e.g. m/d/yyyy h:mm).


----- original message -----

"Joe Perez" wrote in message
...
Hello,

I want to combine the 2 formulas using the IF function. Each scenario
has
its own formula but I want to integrate them into one formula. I'll
appreciate if you could do it for me.

=INT((D13-C13)*24)+((D14-C14)*24)
=INT((H14-G13)*24)

Thanks,






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default If fomula

"Joe Perez" wrote:
so, here's an example of what i'm shooting for..


Wow! I'm surprised that the MS newserver does not strip embedded uuencoded
text, which OE seems to recognize as an attachment. (Biting tongue ;-.)

Your worksheet had the following explanation, which I think you could have
simply written in your posting: "The formula should read If H13 is nothing
G15 is equal to H14-G13, otherwise G15 is equal to H13-G13+H14-G14".

"Nothing" is ambiguous. I think the following will probaby work for you,
entered into G15:

=IF(H13="", INT((H14-G13)*24)), INT((H13-G13 + H14-G14)*24))

The examples in your worksheet do not clarify how you want to truncate the
addition of two elapsed time periods added when H13<"". I believe the one
above is the more appropriate method. But that really depends on your
policies.


----- original message -----

"Joe Perez" wrote in message
...
so, here's an example of what i'm shooting for..

"JoeU2004" wrote in message
...

"Joe Perez" wrote:
I want to combine the 2 formulas using the IF function.


Needless to say, you would get a more helpful response if you explained
the
condition for selecting one formula or the other. The following may or
may
not be helpful.

The general form of the IF expression might be:

=if(condition, INT((D13-C13)*24)+(D14-C14)*24, INT((H14-G13)*24))

What is "condition"? That's for you to answer. It might be something
like:

=if(A1="two shifts", INT((D13-C13)*24)+(D14-C14)*24, INT((H14-G13)*24))


By the way, I suspect the first of your original formulas is incorrect.
I
suspect it should be one of the following, depending on your intention:

1. INT((D13-C13)*24) + INT((D14-C14)*24)

2. INT((D13-C13)*24 + (D14-C14)*24)

3. INT((D13-C13 + (D14-C14))*24)

In #1, two elapsed times are truncated to hours and added; for example,
1.6
+ 2.7 = 3.

In #2, two elapsed times in hours and fractions of an hour are added,
then
truncated; for example, 1.6 + 2.7 = 4.

#3 should be equivalent to #2, but it is more efficient. "(D14-C14)"
could
be written simply as "D14-C14" without parentheses if D14 and C14 contain
only time (e.g. hh:mm) instead of date and time (e.g. m/d/yyyy h:mm).


----- original message -----

"Joe Perez" wrote in message
...
Hello,

I want to combine the 2 formulas using the IF function. Each scenario
has
its own formula but I want to integrate them into one formula. I'll
appreciate if you could do it for me.

=INT((D13-C13)*24)+((D14-C14)*24)
=INT((H14-G13)*24)

Thanks,






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
Help in a fomula Malik Nadeem Excel Discussion (Misc queries) 0 January 10th 09 11:09 AM
Fomula (if?) Jules Excel Worksheet Functions 0 August 8th 06 07:13 PM
Fomula Steve Excel Discussion (Misc queries) 2 December 8th 05 07:29 PM
Please help, i need a fomula Age Formula?? Excel Worksheet Functions 2 October 13th 05 10:32 PM
IF Fomula DWadding Excel Discussion (Misc queries) 1 August 3rd 05 05:32 PM


All times are GMT +1. The time now is 12:36 PM.

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

About Us

"It's about Microsoft Excel"