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: 2
Default Help with deleting rows where the value of the first column isn't divisable by a certain number.

Hi!

I'm working with a pretty big set of info. There are 3 columns and I
want to go through from top to bottom and entirely remove any rows
where the A column's value is not divisable by 15.

Here is the code I've tried to work with:

For I = 9 To 22919
If Me.Cells(I, 1) Mod 15 < 0 Then
Me.Rows(I).Delete
End If
Next


I want check the values in ("A1:A22919")

When I run that code it just deletes every other row. And I'm not
quite sure what is wrong--I know a little about Visual Basic itself,
but I'm unfamiliar using it with Excel :\

I got this together by browsing through Google groups and search, but I
couldn't put it together from different parts and fooling around with
it for a few hours hasn't helped much either ;_;

 
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
deleting number and alphabet columns and rows. Maryann Excel Discussion (Misc queries) 1 May 17th 08 09:52 AM
Deleting rows based on number of characters catalfamo1220 Excel Discussion (Misc queries) 3 July 20th 06 06:31 PM
Deleting 3 rows when current row number is unknown Joe[_31_] Excel Programming 1 May 20th 04 06:41 AM
Deleting rows with repeated number Mark Lopa Excel Programming 2 March 4th 04 01:50 PM
deleting variable number of rows Nick Excel Programming 1 October 29th 03 04:31 PM


All times are GMT +1. The time now is 09:19 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"