Sort data by numbers first and then text or vice versa

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
I am trying to solve this but I am not able to. I have exported this sheet from Tally. In the Debit and Credit columns the amounts are displayed some in numbers and some in format. If I sort the numbers, the formatted numbers should display separately and the normal number should display separately. I tried the answer from one of the older posts, but still I am not able to solve the problem. I need help here.
 

Attachments

  • Untitled.png
    Untitled.png
    16 KB · Views: 17

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi Dear,

to extract numbers only from a cell, please try the following formula (adjust for the reference cell if needed)

=SUMPRODUCT(MID(0&G2, LARGE(INDEX(ISNUMBER(--MID(G2, ROW(INDIRECT("1:"&LEN(G25))), 1)) * ROW(INDIRECT("1:"&LEN(G2))), 0), ROW(INDIRECT("1:"&LEN(G2))))+1, 1) * 10^ROW(INDIRECT("1:"&LEN(G2)))/10)

Regards
 
Upvote 0
Hi Dear,

to extract numbers only from a cell, please try the following formula (adjust for the reference cell if needed)

=SUMPRODUCT(MID(0&G2, LARGE(INDEX(ISNUMBER(--MID(G2, ROW(INDIRECT("1:"&LEN(G25))), 1)) * ROW(INDIRECT("1:"&LEN(G2))), 0), ROW(INDIRECT("1:"&LEN(G2))))+1, 1) * 10^ROW(INDIRECT("1:"&LEN(G2)))/10)

Regards
It ain't working. I need the characters and numbers as they are. I don't want to convert characters. I want to sort in such a way that the numbers are separated first and then the numbers with characters.
 
Upvote 0
It ain't working. I need the characters and numbers as they are. I don't want to convert characters. I want to sort in such a way that the numbers are separated first and then the numbers with characters.
I tried flash fill function in extra columns and it got solved. Thanks for replying Mamady.
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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