Sorting with ABS

JTL9161

Well-known Member
Joined
Aug 29, 2012
Messages
582
Office Version
  1. 365
Platform
  1. Windows
I am adding 4 columns, 3 of which have ABS totals. When I do =Sum( of the 4 columns I get correct sum but when I try to sort the 15 numbers from lowest to highest it does not put them in the correct order. The first column below is the total and this is after I sorted them. The first row of numbers I am adding are 2+1+2.12+.036 = 5.156


<colgroup><col style="mso-width-source:userset;mso-width-alt:1901;width:39pt" width="52"> <col style="mso-width-source:userset;mso-width-alt:987;width:20pt" width="27"> <col style="mso-width-source:userset;mso-width-alt:804;width:17pt" width="22"> <col style="mso-width-source:userset;mso-width-alt:1462;width:30pt" width="40"> <col style="mso-width-source:userset;mso-width-alt:1206;width:25pt" width="33"> </colgroup><tbody>
[TD="class: xl65, width: 52, align: right"]05.16[/TD]
[TD="class: xl66, width: 27, align: right"]2[/TD]
[TD="class: xl66, width: 22, align: right"]1[/TD]
[TD="class: xl67, width: 40, align: right"] 02.12
[/TD]
[TD="class: xl68, width: 33, align: right"].036[/TD]

[TD="class: xl69, align: right"]03.18[/TD]
[TD="class: xl70, align: right"]2[/TD]
[TD="class: xl70, align: right"]0[/TD]
[TD="class: xl71, align: right"]01.18[/TD]
[TD="class: xl72, align: right"].002
[/TD]

[TD="class: xl69, align: right"]02.12[/TD]
[TD="class: xl70, align: right"]0[/TD]
[TD="class: xl70, align: right"]2[/TD]
[TD="class: xl71, align: right"]00.11[/TD]
[TD="class: xl72, align: right"].014[/TD]

[TD="class: xl69, align: right"]06.19[/TD]
[TD="class: xl70, align: right"]3[/TD]
[TD="class: xl70, align: right"]2[/TD]
[TD="class: xl71, align: right"]01.18[/TD]
[TD="class: xl72, align: right"].008
[/TD]

[TD="class: xl69, align: right"]08.83[/TD]
[TD="class: xl70, align: right"]4[/TD]
[TD="class: xl70, align: right"]3[/TD]
[TD="class: xl71, align: right"]01.82[/TD]
[TD="class: xl72, align: right"].008[/TD]

[TD="class: xl69, align: right"]15.05[/TD]
[TD="class: xl70, align: right"]2[/TD]
[TD="class: xl70, align: right"]7[/TD]
[TD="class: xl71, align: right"]06.04[/TD]
[TD="class: xl72, align: right"].009[/TD]

[TD="class: xl69, align: right"]11.48[/TD]
[TD="class: xl70, align: right"]6[/TD]
[TD="class: xl70, align: right"]5[/TD]
[TD="class: xl71, align: right"]00.47[/TD]
[TD="class: xl72, align: right"].005[/TD]

[TD="class: xl69, align: right"]12.32[/TD]
[TD="class: xl70, align: right"]7[/TD]
[TD="class: xl70, align: right"]4[/TD]
[TD="class: xl71, align: right"]01.30[/TD]
[TD="class: xl72, align: right"].019[/TD]

[TD="class: xl69, align: right"]15.36[/TD]
[TD="class: xl70, align: right"]7[/TD]
[TD="class: xl70, align: right"]7[/TD]
[TD="class: xl71, align: right"]01.35[/TD]
[TD="class: xl72, align: right"].010[/TD]

[TD="class: xl69, align: right"]09.78[/TD]
[TD="class: xl70, align: right"]3[/TD]
[TD="class: xl70, align: right"]6[/TD]
[TD="class: xl71, align: right"]00.77[/TD]
[TD="class: xl72, align: right"].014[/TD]

[TD="class: xl69, align: right"]20.13[/TD]
[TD="class: xl70, align: right"]9[/TD]
[TD="class: xl70, align: right"]8[/TD]
[TD="class: xl71, align: right"]03.11[/TD]
[TD="class: xl72, align: right"].015[/TD]

[TD="class: xl69, align: right"]14.03[/TD]
[TD="class: xl70, align: right"]7[/TD]
[TD="class: xl70, align: right"]7[/TD]
[TD="class: xl71, align: right"]00.02[/TD]
[TD="class: xl72, align: right"].007[/TD]

[TD="class: xl69, align: right"]17.86[/TD]
[TD="class: xl70, align: right"]6[/TD]
[TD="class: xl70, align: right"]7[/TD]
[TD="class: xl71, align: right"]04.84[/TD]
[TD="class: xl72, align: right"].022[/TD]

[TD="class: xl69, align: right"]28.39[/TD]
[TD="class: xl70, align: right"]12[/TD]
[TD="class: xl70, align: right"]15[/TD]
[TD="class: xl71, align: right"]01.35[/TD]
[TD="class: xl72, align: right"].039[/TD]

</tbody>
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Would you repost your example showing the negative values or indicate which column has the ABS function?
Are you wanting to sort by the first column (the sum across) or the column with the ABS function in it?

Also, you said 15 numbers, but in your post there are only 14 rows.
 
Last edited:
Upvote 0
I must have missed that last row. Regardless I should have just posted 1 line. Here is the 1st line from above without the ABS. The first column is the sum of the following 4 columns. Column 2,3 and 4 have ABS. Column 3 (02.12) is not ABS.


<colgroup><col width="52"><col width="27"><col width="22"><col width="40"><col width="37"></colgroup><tbody>
[TD="class: xl65, width: 52, align: right"]01.08[/TD]
[TD="class: xl66, width: 27, align: right"]-2[/TD]
[TD="class: xl66, width: 22, align: right"]1[/TD]
[TD="class: xl67, width: 40, align: right"]02.12[/TD]
[TD="class: xl68, width: 37, align: right"]-.036
[/TD]

</tbody>
 
Upvote 0
If you are sorting based on the sum column, then the rows would be arranged based on the sum. So, absolute values in other columns have no bearing on this.
 
Upvote 0
I may not have mentioned this but the sum column is also ABS. Formula is: =SUM(ABS(AG6+AH6+AI6+AJ6))
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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