sorting data

cybertroy1

New Member
Joined
Jul 18, 2008
Messages
7
I have a column of 11,000 individual numbers, comprised of alpha and numeric characters. The 5th character of each number is either alpha or a hyphen. How can I enter an if then statement to separate these into groups?
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi cybertroy and welcome to the board.

I'm not clear exactly what you want to do - do you want to separate the "5th character alpha" entries from the "5th character hyphen" entries ?

Or, maybe you want to split the first 4 characters in each entry from the characters after the 5th one ?

Or maybe something entirely different ?

Both of the first two can be done quite easily - can you confirm exactly what you want please ?

Good luck !
 
Upvote 0
this is an example of what I'm trying to do.

1160DOW
1224-001
2237-002
3345EX

I want to separate the 5th character alphas from the 5th character dashes. Make sense?
 
Upvote 0
Yes that makes sense, thanks.

Use a helper column to pull out the 5th character.
Perhaps something like this, assuming your data is in Column A starting on Row 1.

Code:
=if(mid(a1,5,1)="-","DASH","ALPHA")
and then sort your data using this column as the main sort key.
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,436
Members
449,083
Latest member
Ava19

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