Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum of two columns must equal the sum of another column 2

Status
Not open for further replies.

monkeysee

Programmer
Sep 24, 2002
201
US
I am working on a time sheet that totals the amount of time worked for the entire day.
In addition, the time worked is split between two programs. The time recorded for one program is in Column G; and the other in column H. The totals of these columns (g+h) should equal the actual total calculated hours for the day which is in Column F.

What I want excel to do, is to compare the two totals (g+h) to (f). If they match great!, but if they don't, I'd like excel to give an error message to the user to make the correction.

Is any of this possible?

thanks for all the great help everyone gives through this website! You are all the greatest!
 
hi,

Use conditional formatting to shade the cell (maybe RED) when the sums are not equal.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Ok that sounds like a good idea!, So how would I construct the formula, including the comparing of the two fields?
 
[tt]
=sum(Ref1,Ref2)<>sum(Ref3,Ref4)
[/tt]
like this...
[tt]
=SUM($A2,$B2)<>SUM($C2,$D2)
[/tt]

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top