Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-28-2017, 08:14 AM
caz46 caz46 is offline Adding IF in nested formulas Windows 8 Adding IF in nested formulas Office 2013
Advanced Beginner
Adding IF in nested formulas
 
Join Date: Feb 2011
Posts: 73
caz46 is on a distinguished road
Default Adding IF in nested formulas

Hi,



I have a formula calculating number of hours as follows:

=TEXT(MAX([@Total2],[@Début])-MIN([@Total2],[@Début]),"-H::MM")

I would like to add an If statement, saying that if cell ## returns a result of 0:00 (hrs) then leave the cell blank.

How do I add this into the existing formula?

Thanks
Caz
Reply With Quote
  #2  
Old 03-28-2017, 09:18 AM
gebobs gebobs is offline Adding IF in nested formulas Windows 7 64bit Adding IF in nested formulas Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

If I understand correctly, try this:

=IF(MAX([@Total2],[@Début])-MIN([@Total2],[@Début])=0,"",TEXT(MAX([@Total2],[@Début])-MIN([@Total2],[@Début]),"-H::MM"))

Out of curiosity, why are you using the TEXT function?
Reply With Quote
  #3  
Old 03-28-2017, 11:21 AM
caz46 caz46 is offline Adding IF in nested formulas Windows 8 Adding IF in nested formulas Office 2013
Advanced Beginner
Adding IF in nested formulas
 
Join Date: Feb 2011
Posts: 73
caz46 is on a distinguished road
Default

That worked great, thanks :-)

I have used this formula as it is the only way I could get the results to show negative results when using time formulas.
Reply With Quote
  #4  
Old 03-30-2017, 12:12 AM
caz46 caz46 is offline Adding IF in nested formulas Windows 8 Adding IF in nested formulas Office 2013
Advanced Beginner
Adding IF in nested formulas
 
Join Date: Feb 2011
Posts: 73
caz46 is on a distinguished road
Default Equation still not working

Unfortunately, my equation still does not work, please see the attached image.

It is calculating the negative hours OK, but it is showing the positive variations as negative? I have marked the cells which should be positives in yellow.

I have tried the basic Total2 - Total but this does not show the negative results.

Any help would be great.
Attached Images
File Type: jpg Calculating hours.jpg (189.2 KB, 17 views)
Reply With Quote
  #5  
Old 03-30-2017, 02:42 AM
xor xor is offline Adding IF in nested formulas Windows 10 Adding IF in nested formulas Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

See the attached.
Attached Files
File Type: xlsx 1904_Date_System.xlsx (293.4 KB, 9 views)
Reply With Quote
  #6  
Old 03-30-2017, 03:38 AM
caz46 caz46 is offline Adding IF in nested formulas Windows 8 Adding IF in nested formulas Office 2013
Advanced Beginner
Adding IF in nested formulas
 
Join Date: Feb 2011
Posts: 73
caz46 is on a distinguished road
Default

Yes, this worked perfectly. Thanks very much
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding IF in nested formulas 6 (or 7) Nested IFs! JuicyHMouse Excel 1 03-11-2017 06:41 AM
nested formula using IF & AND paxon Excel 3 02-18-2016 05:32 AM
Adding IF in nested formulas Nested IF TDWolsey Excel 2 01-06-2016 11:31 PM
Adding IF in nested formulas Adding rows and copying formulas ejtoll Word Tables 1 12-05-2012 05:09 PM
Adding IF in nested formulas Nested IFs JimS378 Excel 7 05-03-2011 08:20 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:38 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft