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: 6
Default use vb to delete marked rows

Having trouble with this one, hope someone can help me with the code.
I have a sheet with rows 3-700 and columns A-J. I want to have some vb code
that when run(doing it on a click action for a button) deletes rows that I
have marked with an X in cell J3-J700. So if it sees a X in cell J3, it
highlights the entire row and deletes it, then move on to J4 and checks for
the X and so on. If there is no X then it should just move to the next one
and keep checking.
I can get it to sort of work with if/then statements, but one problem I'm
having is when you delete a row they all shift up, so just going to the next
row starts to "skip" rows that were moved up. And the other problem is how
to simplify the code for J3-J700 so I don't have to put 700 if/then
statements in. Thanks for any help.


 
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
Hpw do I delete multiple empty rows found between filled rows? Bill Excel Worksheet Functions 2 November 15th 09 07:12 PM
Marking cell; totaling all # between marked cell & next marked cel Marley Excel Worksheet Functions 4 February 26th 09 01:26 AM
How to delete all stuff outside marked cells ? Jeff Korn Excel Discussion (Misc queries) 1 March 5th 08 08:40 PM
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows Scott Excel Worksheet Functions 0 December 13th 06 01:25 AM
How to delete rows when List toolbar's "delete" isnt highlighted? Linda Excel Worksheet Functions 1 May 26th 05 08:39 PM


All times are GMT +1. The time now is 07:34 PM.

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"