Using Sort formula for numbers in the same row.

Russk68

Well-known Member
Joined
May 1, 2006
Messages
589
Office Version
  1. 365
Platform
  1. MacOS
On a Mac. When I use the Sort function like this =SORT(A1:A10) It will sort any numbers in any combination from lowest to highest as I expected. It even puts the blanks at the bottom as 0.
But when I want to do the same thing here =SORT(A1:A10) it doesn't work. I tried =SORT(A1:A10,1,-1,1) and everything else and I can't get it to work. Why does the SORT function treat the array differently and how can I get it to work?
Thank you!
 

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.
Very difficult to help, with no data & both formulae exactly the same. ;)
 
Upvote 0
The formula in BN8 works as I would expect. The formula in BN19 doesn't. I would expect the same results.
Distro Canelo.xlsx
BABBBCBDBEBFBGBHBIBJBKBLBMBNBOBPBQBRBSBTBUBV
5
6
7
8331
9443
1053233
1144
12173
13532
1430
150
16730
17
18
193344532137333445320103073
20
Untitled Worksheet-2
 
Upvote 0
Thanks for that, you need to specify that it is to sort by column, like
Excel Formula:
=SORT(BA19:BI19,,,1)
 
Upvote 0
Solution
Hi Fluff
Will this work with the results of the cells that I'm trying to sort being from a formula? When I use the formula in that situation, it doesn't work.
 
Upvote 0
I can't figure out the results that I am seeing. The formulas are in column BN.
I thought the Yellow section on the right was causing undesired result because of the formulas in yellow on the left.
I pasted values from the yellow section on the left to the orange section below and the orange section on the right have the same unexpected results as the yellow but no formulas are present on the left.
I typed in the values in blue and got the desired results.
I pasted in the values in green from the blue and got the desired results.
The sheet is formatted as General.



Distro Canelo.xlsx
AKALAMANAOAPAQARASATAUAVAWBMBNBOBPBQBRBSBTBUBVBWBXBYBZ
2701 705702 703705701702703000000
33370323519219333570300000
43370323519219333570300000
5701705702703705701702703000000
Untitled Worksheet-2
 
Upvote 0
I suspect that you have a mixture of real numbers & text. On the 1st & last rows only the 705 is a number & the others are text.
 
Upvote 0
Oh, I see that. I formatted the whole sheet as General. I see everything is formatted as General when I have all those rows selected. What am I doing wrong that those cells are formatted as text?
 
Upvote 0
The cell format is irrelevant as all it does is change the way a values is displayed. Changing cell formats, does not affect the actual value itself.
The values in H2, Q2 & W2 are text.
 
Upvote 1

Forum statistics

Threads
1,213,489
Messages
6,113,949
Members
448,534
Latest member
benefuexx

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