LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default deleting non-numeric rows

Can anyone help me? I'm trying to have a macro look in column A and delete
any non-numeric rows (ie... total, Net o, Net I, 76420) from the data.
Basically, I just need the rows that have numbers in column A (less 76420).
Then I need to combine all of the the 52270 lines into one row.

Data:

52200 17625.9 7500 14924.68 3334 -1778 2762
52201 0 0 0 -0.62 8795 3750
52203 0 0 0 0 0 0
52204 10508.34 3950 10666.68 0.34 0 0
52206 0 0 0 0.36 533 80
52207 4611.05 1833 5322.46 665.34 193 55
52217 2045.8 315 17.1 -2.7 90 119
52261 -496 -8016 0 75 553 743
52000 0 0 0 0 0 0
Total 34295.09 5582 30930.92 4071.72 8386 7509
52270 -1583.32 0 0 0 0 0
52270 0 0 0 0 0 0
52270 -1951.26 0 0 0 0 0
52270 19044.54 0 0 0 0 0
52270 5952.71 0 0 0 0 0
52270 3959.57 0 0 0 0 0
52270 7582.63 0 0 0 0 0
52270 14701.37 0 0 0 0 0
52270 3544.5 0 0 0 0 0
52270 615.1 0 0 0 0 0
Total 18860.97 0 0 0 0 0
Total 51865.84 0 0 0 0 0
Total 86160.93 5582 30930.92 4071.72 8386 7509
60440 820.23 0 0 0 0 0
63120 1050.97 0 400 0 0 0
63410 0 0 0 0 0 0
65182 500 0 0 0 0 0
65310 4115.33 0 0 0 0 0
65510 0 0 0 0 0 0
65720 340 0 0 350 5 0
Total 6826.53 0 400 350 5 0
76410 5534.81 0 0 0 0 0
Total 98522.27 5582 31330.92 4421.72 8391 7509
Net O -98522.27 -5582 -31330.92 -4421.72 -8391 -7509
76420 302000 0 0 0 0 0
Total 302000 0 0 0 0 0
Net O 302000 0 0 0 0 0
Net I 203477.73 -5582 -31330.92 -4421.72 -8391 -7509

I wrote the following code but it isn't completly working. It's still
leaves one row that is labeled as "total" (it might be a formating
situation). I'm also not sure of the most efficient way to add up all of the
52270 rows into one. I know that my code might not be the most efficient,
but I don't have a programming background. I also seem to have trouble
getting mutliple criteria IF statements to work on my computer at work.

Do While ActiveCell.Value ""

If ActiveCell.Text = "Total" Then
Selection.EntireRow.Delete

End If

If ActiveCell.Value = 76420 Then
Selection.EntireRow.Delete

End If

If ActiveCell.Text = "Net O" Then
Selection.EntireRow.Delete

End If

If ActiveCell.Text = "Net I" Then
Selection.EntireRow.Delete

End If

ActiveCell.Offset(1, 0).Select

Loop


any help would be appreciated.

--
Regards,

timmulla
 
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
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Links and Linking in Excel 1 November 13th 08 08:44 AM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Setting up and Configuration of Excel 1 November 12th 08 06:05 PM
Help!! I have problem deleting 2500 rows of filtered rows!!!! shirley_kee Excel Discussion (Misc queries) 1 January 12th 06 03:24 AM
deleting hidden rows so i can print only the rows showing?????? jenn Excel Worksheet Functions 0 October 6th 05 04:05 PM
Deleting non numeric characters. CyndyG Excel Programming 2 May 4th 05 10:50 PM


All times are GMT +1. The time now is 03:46 AM.

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

About Us

"It's about Microsoft Excel"