Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
TPG TPG is offline
external usenet poster
 
Posts: 5
Default How to delete unwanted lines

I have very messy data after sorted, how to delete? In this case, I wanted
to keep cell from A6 onwards. Thanks in advance.
A
1 -------- ---- ---+++ 8 %% ---
2 -------- *** dl lii --
3 setion line : 3546 098
4 Total : 98739 - 26254
5 ===== == ++ == ==
6 22413490013
7 27987542001
8 28213407096
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How to delete unwanted lines

Hi,

From the data you have posted you could do it with a simple sort and then
select and delete all the rows that begin with non-numeric characters.

Mike

"TPG" wrote:

I have very messy data after sorted, how to delete? In this case, I wanted
to keep cell from A6 onwards. Thanks in advance.
A
1 -------- ---- ---+++ 8 %% ---
2 -------- *** dl lii --
3 setion line : 3546 098
4 Total : 98739 - 26254
5 ===== == ++ == ==
6 22413490013
7 27987542001
8 28213407096

  #3   Report Post  
Posted to microsoft.public.excel.misc
TPG TPG is offline
external usenet poster
 
Posts: 5
Default How to delete unwanted lines

Thanks for your quite respond to my question. Infact my actual file is very
big (30k in term of rows), is there any other better way to solve it.
Thanks.

"Mike H" wrote:

Hi,

From the data you have posted you could do it with a simple sort and then
select and delete all the rows that begin with non-numeric characters.

Mike

"TPG" wrote:

I have very messy data after sorted, how to delete? In this case, I wanted
to keep cell from A6 onwards. Thanks in advance.
A
1 -------- ---- ---+++ 8 %% ---
2 -------- *** dl lii --
3 setion line : 3546 098
4 Total : 98739 - 26254
5 ===== == ++ == ==
6 22413490013
7 27987542001
8 28213407096

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default How to delete unwanted lines

Another way
sub delrows()
for i=cells(rows.count,1).end(xlup).row to 2 step -1
if not isnumeric(cells(i,1)) then rows(i).delete
next i
end sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"TPG" wrote in message
...
I have very messy data after sorted, how to delete? In this case, I wanted
to keep cell from A6 onwards. Thanks in advance.
A
1 -------- ---- ---+++ 8 %% ---
2 -------- *** dl lii --
3 setion line : 3546 098
4 Total : 98739 - 26254
5 ===== == ++ == ==
6 22413490013
7 27987542001
8 28213407096


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default How to delete unwanted lines

Hi,

Here are 3 suggestions:

1. Sort the data as suggested. 30000 lines doesn't make any difference.
Then all the items you want will be grouped together and you can select the
row numbers for all the rest and press Ctrl+- (ctrl minus)

2. Choose Data, Filter, AutoFilter and in the column where your numbers are
open the autofilter drop down and choose Custom. From the first drop down
pick greater than and in the second drop down enter a number maybe 100000000
or even 1. If the data you want to retain are numbers then everything else
will be hidden. Press Ctrl A. Then copy and move to a different sheet and
choose Paste.
This should copy only the visible cells.

3. Insert a blank column to the right of the column with number you want,
lets suppose that is column A, then in B1 enter the formula =1/ISNUMBER(A1)
This will return an error for all cells that don't contain numbers. Copy
this down the all the way to the bottom of your data. Select the column and
press Ctrl+G, Special, select Formulas, and uncheck all but Errors. After
you press OK, press Ctrl+- (control minus) and choose Entire row.

--
Thanks,
Shane Devenshire


"TPG" wrote:

I have very messy data after sorted, how to delete? In this case, I wanted
to keep cell from A6 onwards. Thanks in advance.
A
1 -------- ---- ---+++ 8 %% ---
2 -------- *** dl lii --
3 setion line : 3546 098
4 Total : 98739 - 26254
5 ===== == ++ == ==
6 22413490013
7 27987542001
8 28213407096

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete unwanted records TPG Excel Discussion (Misc queries) 3 November 4th 08 10:32 AM
Delete unwanted sheet Brenda Excel Discussion (Misc queries) 6 October 19th 08 06:13 AM
Delete unwanted data JJ Excel Worksheet Functions 1 February 26th 08 08:14 AM
In excel, how do I remove unwanted lines for printing Darren N Excel Discussion (Misc queries) 1 October 2nd 06 01:41 PM
Delete Unwanted Data Happy Excel Discussion (Misc queries) 1 August 17th 05 06:20 AM


All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"