Sort

Gregp13

New Member
Joined
Sep 3, 2021
Messages
4
Office Version
  1. 2019
Platform
  1. Windows
I have a spreadsheet that I want to total. Some names may have single entries, others have multiple. I need total the column G's so each name has only one line. Using column A to sort .
Cheers Greg

8111111​
Smith,John
7/05/2019​
No
3​
ABCDEF
123456​
8111111​
Smith,John
14/05/2019​
No
3​
ABCDEF
123456​
8111111​
Smith,John
18/06/2019​
No
3​
ABCDEF
123456​
8222222​
Jones,Ian
5/07/2018​
No
3​
ABCDEF
123456​
8222222​
Jones,Ian
7/07/2018​
No
6​
ABCDEF
123456​
8222222​
Jones,Ian
10/07/2018​
No
3​
ABCDEF
123456​
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Welcome to MrExcel Message Board.
You want Sort based Column A. Select Range then at the Home Tab Select Sort and Filter option Dropdown, Then Select Custom Sort, Then Select column you want and sort it A-z or Z-A for Text and Smallest to largest or ... for Numbers.
 
Upvote 0
And For Total Based Column A Try This:
Book1
ABCDEFGHIJKL
1
28111111Smith,John7/05/2019No3ABCDEF1234569
38111111Smith,John14/05/2019No3ABCDEF123456 
48111111Smith,John18/06/2019No3ABCDEF123456 
58222222Jones,Ian5/07/2018No3ABCDEF12345612
68222222Jones,Ian7/07/2018No6ABCDEF123456 
78222222Jones,Ian10/07/2018No3ABCDEF123456 
8
9
10
Sheet2
Cell Formulas
RangeFormula
K2:K7K2=IF(COUNTIF($A$2:A2,A2)=1,SUMIF($A$2:$A$7,A2,$G$2:$G$7),"")
 
Upvote 0
Solution
Or Try Red Part:
Book1
ABCDEFGHIJKLMNOP
1CodeNameDateTotalUnique ListNameTotal
28111111Smith,John7/05/2019No3ABCDEF12345698111111Smith,John9
38111111Smith,John14/05/2019No3ABCDEF123456 8222222Jones,Ian12
48111111Smith,John18/06/2019No3ABCDEF123456    
58222222Jones,Ian5/07/2018No3ABCDEF12345612  
68222222Jones,Ian7/07/2018No6ABCDEF123456   
78222222Jones,Ian10/07/2018No3ABCDEF123456   
8
9
Sheet2
Cell Formulas
RangeFormula
N2:N7N2=IFNA(VLOOKUP(M2,$A$2:$B$7,2,0),"")
O2:O7O2=IF(SUMIF($A$2:$A$7,M2,$G$2:$G$7)=0,"",SUMIF($A$2:$A$7,M2,$G$2:$G$7))
M2:M4M2=IFERROR(INDEX($A$2:$A$7, MATCH(0,COUNTIF($M$1:M1, $A$2:$A$7), 0)),"")
K2:K7K2=IF(COUNTIF($A$2:A2,A2)=1,SUMIF($A$2:$A$7,A2,$G$2:$G$7),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
And For Total Based Column A Try This:
Book1
ABCDEFGHIJKL
1
28111111Smith,John7/05/2019No3ABCDEF1234569
38111111Smith,John14/05/2019No3ABCDEF123456 
48111111Smith,John18/06/2019No3ABCDEF123456 
58222222Jones,Ian5/07/2018No3ABCDEF12345612
68222222Jones,Ian7/07/2018No6ABCDEF123456 
78222222Jones,Ian10/07/2018No3ABCDEF123456 
8
9
10
Sheet2
Cell Formulas
RangeFormula
K2:K7K2=IF(COUNTIF($A$2:A2,A2)=1,SUMIF($A$2:$A$7,A2,$G$2:$G$7),"")
Thanks very much for that.
Or Try Red Part:
Book1
ABCDEFGHIJKLMNOP
1CodeNameDateTotalUnique ListNameTotal
28111111Smith,John7/05/2019No3ABCDEF12345698111111Smith,John9
38111111Smith,John14/05/2019No3ABCDEF123456 8222222Jones,Ian12
48111111Smith,John18/06/2019No3ABCDEF123456    
58222222Jones,Ian5/07/2018No3ABCDEF12345612  
68222222Jones,Ian7/07/2018No6ABCDEF123456   
78222222Jones,Ian10/07/2018No3ABCDEF123456   
8
9
Sheet2
Cell Formulas
RangeFormula
N2:N7N2=IFNA(VLOOKUP(M2,$A$2:$B$7,2,0),"")
O2:O7O2=IF(SUMIF($A$2:$A$7,M2,$G$2:$G$7)=0,"",SUMIF($A$2:$A$7,M2,$G$2:$G$7))
M2:M4M2=IFERROR(INDEX($A$2:$A$7, MATCH(0,COUNTIF($M$1:M1, $A$2:$A$7), 0)),"")
K2:K7K2=IF(COUNTIF($A$2:A2,A2)=1,SUMIF($A$2:$A$7,A2,$G$2:$G$7),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
Hello Maabadi, do I just use the formula in red< or all 3?
 
Upvote 0
Red Part has 3 Column. Column 1 & 2 for Extract unique values. and column 3 for sum based unique values. Then you need all 3.
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,603
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top