Sort Phone Numbers By Rows From Small To Large Or Large To Small

babulalgandhi

New Member
Joined
Feb 5, 2015
Messages
12
Hi Friends

I Have Phone Numbers Like This To Sort By Rows

66-66970877, 22-34567, 8764576890, 333-7465 (A1,B1,C1,D1)

These Are Phone Numbers Which I Have To Short For Small To Large Or Large To Small

Sorting Data In Row P1 To S1
22-34567, 333-7465, 66-66970877, 8764576890 (P1,Q1,R1,S1)

P1 = small($a1:$d1,1)
Q1 = small($a1:$d1,2)
R1 = small($a1:$d1,3)
S1 = small($a1:$d1,4)

These Formula Works Great On Without (-) Numbers.

I Need Formula To Ignore (-)


Thanks & Regards
Babulal Gandhi
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
gaz_chopls rightly says, please remove "-" as Small, Large formula works only on numeric data.
To remove "-" between this numbers, I suggest the following formula:
E1=value(IFERROR(LEFT(A1,SEARCH("-",A1,1)-1)&TRIM(MID(A1,SEARCH("-",A1,1)+1,10)),A1))
Copy E1 to F1,G1 and H1

Then please the following formula:
P1=small($E1:$H1,Column(A1))
Copy P1 to Q1, R1 and S1

Regards,
 
Upvote 0
Or simply highlight data and use find&replace, find - replace with nothing


Hi Gaz_Chops Thanks For Suggestions.

Numbers Before (-) Is Area Codes. If I Remove (-) With Your formula Or With Find & Replace. I Will Get Confuse In Future As I Can't Differentiate Area Code And Phone Number.

I Want To Short Telephone Numbers In Three Rows After Mobile Numbers In Other Three Rows.

P1-Telephone Number, Q1-Telephone Number, R1-Telephone Number, S1-Mobile Number, T1-Mobile Number, U1-Mobile Number

Again Thanks For Reply
 
Upvote 0
I Have Phone Numbers Like This To Sort By Rows
66-66970877, 22-34567, 8764576890, 333-7465
(Column A1,Column B1,Column C1,Column D1)
These Are Phone Numbers Which I Have To Short For Small To Large Or Large To Small
Sorting Data In Row P1 To S1
22-34567, 333-7465, 66-66970877, 8764576890
(Column P1,Column Q1,Column R1,Column S1)
Column P1 = small($a1:$d1,1),
Column Q1 = small($a1:$d1,2),
Column R1 = small($a1:$d1,3),
Column S1 = small($a1:$d1,4)
These Formula Works Great On Without (-) Numbers.
I Need Formula To Ignore (-)
Numbers Before (-) Is Area Codes. If I Remove (-) With Find & Replace. I Will Get Confuse In Future As I Can't Differentiate Area Code And Phone Number.
If There Is Solution In Macro
I Want To Short Telephone Numbers In Three Rows After Mobile Numbers In Other Three Rows.
P1-Telephone Number, Q1-Telephone Number, R1-Telephone Number, S1-Mobile Number, T1-Mobile Number, U1-Mobile Number
I Need A Macro

  1. Ignores The (-) Value In All Phone Numbers
  2. Check First Digit Of Phone Numbers.
  3. If First Digit Start's With Nine(9). If There Is Any Single Phone Number In A1, B1, C1, D1 Starting With Nine(9)(It's Mobile Number) Put Into S1. Else If There's Two Numbers Starting With Nine (9) Place It In Row S1 And T1 In Ascending Or Descending Order.
  4. If First Digit Start's With Eight (8). If There Is Any Single Phone Number In A1, B1, C1, D1 Starting With Eight (8) Put Into Q1. Else If There's Two Numbers Starting With Eight (8) Place It In Row Q1 And R1 In Ascending Or Descending Order.
Like Wise For Other Digits Too
Thanks & Regards
Babulal Gandhi
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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