ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   comparing columns to find a difference (https://www.excelbanter.com/excel-worksheet-functions/206816-comparing-columns-find-difference.html)

ysobored

comparing columns to find a difference
 
I have four columns below is the example

Name Qty Name Qty
John 4 Scott 3
Jim 3 John 2
Jake 2 Jim 1

What I need to do is compare "Name" column and take the difference between
the "Qty column

Result would be John 2, Jim 2, Jake 2, Scott -3

Any help would be great, not looking to sort because I have lots of data.
Guessing Index Match, but can't get it to work

Mike H

comparing columns to find a difference
 
Hi,

The easist way is to extract the list of names and I put this in f1 and
dragged down
=A2
then at the end of that list I put this in column f and dragged down
=C2
this gave me a list in F1 down looking like this
John
Jim
Jake
Scott
John
Jim
In g1 I put the formula
=SUMIF($A$2:$A$4,F1,$B$2:$B$4)-SUMIF($C$2:$C$4,F1,$D$2:$D$4)
and dragged down

Mike

"ysobored" wrote:

I have four columns below is the example

Name Qty Name Qty
John 4 Scott 3
Jim 3 John 2
Jake 2 Jim 1

What I need to do is compare "Name" column and take the difference between
the "Qty column

Result would be John 2, Jim 2, Jake 2, Scott -3

Any help would be great, not looking to sort because I have lots of data.
Guessing Index Match, but can't get it to work



All times are GMT +1. The time now is 05:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com