|
-
Oct 16th, 2005, 11:11 PM
#1
Thread Starter
New Member
Iterate through rows and delete non-numeric
Hi,
I realise my last question was probably not specific enough.
How do I iterate through every row in a worksheet without knowing how many rows there could be?
Also how do I delete a whole row?
Thanks,
:Ant
-
Oct 17th, 2005, 02:55 AM
#2
Re: Iterate through rows and delete non-numeric
or something like that - type it in and press f1 - should be some information on deleting.
Either that or use a range/cell object...
Code:
sht.cells(1,1).DeleteRow
Again look in the help files to clarify.
Alternatively record a macro of you deleting a row and see what the code is.
As to the how many rows. You could move up from the bottom to see when a key field (that is always filled) in your data is and grab the row number.
Code:
debug.print sht.cells(65535,1).end(xlup).row
Hope that gives you some ideas.
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|