Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Nicole L.
 
Posts: n/a
Default Comparing/matching totals in a column to totals in a row

Is there a way to put a formula in a cell to compare the total of the cells
above it (the column) and the totals of the data in the cells to the left of
it (the row) to make sure they match up? I would use this just to make sure
that I hadn't messed up any of my SUMs throughout the worksheet. Just as a
doublechecking mechanism.

Thanks
  #2   Report Post  
Ken Wright
 
Posts: n/a
Default

=ROUND(SUM(H1:H100),2)=ROUND(SUM(A101:G101),2) could be one way. I use
round in there because for various reasons (floating point accuracy) you
could have say what looks like 0.2 = 0.2 as a result (and you would expect
TRUE) which was in reality 0.2=0.19999999999 or something similar and
returned FALSE.

http://cpearson.com/excel/rounding.htm

Use conditional formatting to flag the cell bright red if the answer is
FALSE.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Nicole L." wrote in message
...
Is there a way to put a formula in a cell to compare the total of the

cells
above it (the column) and the totals of the data in the cells to the left

of
it (the row) to make sure they match up? I would use this just to make

sure
that I hadn't messed up any of my SUMs throughout the worksheet. Just as a
doublechecking mechanism.

Thanks



  #3   Report Post  
Nicole L.
 
Posts: n/a
Default

Is there an "IF... Then" option I can use?

Like:
If SUM(H1:H100),2=SUM(A101:G101),2, then input the Sum.
And if SUM(H1:H100),2 does NOT equal SUM(A101:G101),2, then input "ERROR".

(By the way, do I need the ",2"? I'm not sure what that denotes.)

Thanks


"Ken Wright" wrote:

=ROUND(SUM(H1:H100),2)=ROUND(SUM(A101:G101),2) could be one way. I use
round in there because for various reasons (floating point accuracy) you
could have say what looks like 0.2 = 0.2 as a result (and you would expect
TRUE) which was in reality 0.2=0.19999999999 or something similar and
returned FALSE.

http://cpearson.com/excel/rounding.htm

Use conditional formatting to flag the cell bright red if the answer is
FALSE.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Nicole L." wrote in message
...
Is there a way to put a formula in a cell to compare the total of the

cells
above it (the column) and the totals of the data in the cells to the left

of
it (the row) to make sure they match up? I would use this just to make

sure
that I hadn't messed up any of my SUMs throughout the worksheet. Just as a
doublechecking mechanism.

Thanks




  #4   Report Post  
Ken Wright
 
Posts: n/a
Default

The 2 was part of the ROUND function that I was using, and rounded the two
values each to 2 dps which was enough generally for me to be sure that the
two values were equal.

You can go with or without the ROUND but I'm generally belt and braces with
this kind of stuff and like to cover all the angles if I can.

Either
=IF(ROUND(SUM(H1:H100),2)=ROUND(SUM(A101:G101),2), SUM(A101:G101),"ERROR")

or without the round

=IF(SUM(H1:H100)=SUM(A101:G101),SUM(A101:G101),"ER ROR")

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------


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
How do I sort by row instead of by column? PercivalMound Excel Worksheet Functions 7 August 28th 06 10:41 PM
Format cell in column B based on value in the next cell (column c) Nicole Excel Discussion (Misc queries) 7 May 18th 05 10:19 PM
How do I multiply Column G Totals by a number and display the res. wewgyro Excel Discussion (Misc queries) 2 December 5th 04 04:27 PM
Copying the contents of a column into a chart Richard Excel Worksheet Functions 1 November 16th 04 02:39 PM
How to calculate the data in excel 2002 including only the last 9. TylerMaricich Excel Worksheet Functions 6 November 8th 04 07:27 AM


All times are GMT +1. The time now is 12:10 AM.

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"