The loop cycles through my sheet correctly but wont delete any cells. What's the deal?
Please Login or Register to view this content.
The loop cycles through my sheet correctly but wont delete any cells. What's the deal?
Please Login or Register to view this content.
I'm not sure if you really want to delete cells or just clear the contents.
I'll assume you want to clear the contents:
This code test each cell from E2 through the last non-blank Col_E cell. If the cell's value is TRUE (the text TRUE, not the boolean value), the contents of the corresponding cell in Col_B are cleared.
Does that help?Please Login or Register to view this content.
If not....what do you want your code to do?
That is exactly what I want my code to do. Thank you so much! I'm grateful for you code but was just still curious why mine was not working.
Thanks again!
I tried this variation of your code on a different section of what I'm working on. It only half works though. I use one purge routine to take out the contents of one column, then a second purge routine to take out a second column. If the two purge routines result in both columns being cleared then I have this third purge that just deletes the record entirely.Please Login or Register to view this content.
However, its not deleting every record with two blank columns, even when they show "TRUE" in the G column. I'm not sure how to get it to do that. Thanks for everything by the way!
Try this
Please Login or Register to view this content.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
When deleting rows, you need to start from the BOTTOM....Otherwise, it's like cutting off the tree limb you're standing on.
Try this:
Does that help?Please Login or Register to view this content.
Didn't work unfortunately. Maybe it needs to be step 1 instead of step -1?
Still learning a great deal sorry!
I appreciate everyone's help here though. You guys are awesome!
RoyUK's was the one I tried I will try the latest. Thanks again!
My sheet contains 51000 records roughly. How long would this take to cycle all the way through. I let it run for two and a half hours and it was still going when I came back.
How long should this take?
A few seconds really. Is your Page break view on? Set it off.Originally Posted by evilrtc
RoyUK's solution should work. What is the problem you are facing? What do you mean not working? The cell must contain only "TRUE" - no leading or lagging spaces. If you may have spaces use TRIM to remove the spaces. Modify one line to If TRIM(UCase(cCell.Value)) = "TRUE" Then
A V Veerkar
Last edited by avveerkar; 08-20-2007 at 03:22 PM.
Remember to set:
I've seen that normally over 99% of the execution time is spent for screen updates.Please Login or Register to view this content.
Originally Posted by evilrtc
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks