sort and clean up a list

chouston

Board Regular
Joined
Apr 24, 2002
Messages
68
anyone know how I can sort this mess...
e.g.

a101
----
aprt
a102
b103
>>>>
a103
c201
====
c203
build


I want to sort to this:

a101
a102
a103
b103
c201
c203

I don't think isnumeric will work for me...I'm really stuck with this one!

Any help greatly appreciated!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
On 2002-05-08 11:15, chouston wrote:
anyone know how I can sort this mess...
e.g.

a101
----
aprt
a102
b103
>>>>
a103
c201
====
c203
build


I want to sort to this:

a101
a102
a103
b103
c201
c203

I don't think isnumeric will work for me...I'm really stuck with this one!

Any help greatly appreciated!

In a column next to your data, enter:

=ISNUMBER(RIGHT(A1)+0)+0

and copy down.

Then sort on the second column descending then the first column ascending.
 
Upvote 0
Thanks Aladin!
I was trying to use vba to do this, but I was able to use your advice and make some progress, I'm able to identify the cells I want using the following code, but am having trouble deleting the row. Perhaps you (or anyone) might be able to suggest the proper syntax:

cleanrange = ActiveWorkbook.Sheets("data").Range(Cells(1, 1), Cells(4000, 1))

For Each cel In cleanrange
aptunit = Right(cel, 3)
If IsNumeric(aptunit) = False Then
ActiveWorkbook.Sheets("data").Range(cel).EntireRow.Delete
End If
Next cel

Many thanks
 
Upvote 0
If all the data is in one column and is how you list then try this:

if there is not a title row, insert one

copy the entire column to another column
data/text to columns/fixed with
insert a break line after the first character only and remove any others

Highlight the entire range
data/filter/auto filter

in the third column should now only be numbers or characters

click on the dropdown, custom, is greater than 0

copy this, paste it into another workbook, and delete any unnecessary columns
 
Upvote 0
Could someone suggest vba function or syntax I can use to delete the entirerow if not numeric?

--
cleanrange = ActiveWorkbook.Sheets("data").Range(Cells(1, 1), Cells(4000, 1))

For Each cel In cleanrange
aptunit = Right(cel, 3)
If IsNumeric(aptunit) = False Then
====> "I want to delete this row!!!"
End If
Next cel
--

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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