I need a macro that will selct a range, remove the cells that a formula returned as zero, then shift all others left.
Thanks,
Gabby11
I need a macro that will selct a range, remove the cells that a formula returned as zero, then shift all others left.
Thanks,
Gabby11
![]()
Please Login or Register to view this content.
Range(Right(del_range, Len(del_range) - 1)).Delete shift:=xlToLeft
It's telling me this part doesn't work.
Any ideas?
I tested it and it worked ok. I guess if you had no 0 cells in your range then it would give you an error. Can you attach your workbook?
I think it attached...
What is the range you want to look at?
The Cell range is A51:p76
I want it to show the weeks in column 1 and then the codes without the blanks in between.
I think it's because there were too many cells to delete, that way would have a limit of the number of characters you could use to select the range. Use this instead:
![]()
Please Login or Register to view this content.
It worked. Is there a way to (for lack of better word) unrun the macro. How do I go back to my formulas so I can make changes up above and run it again?
You can't unrun it, there would be no record of which cells it deleted.
Can I add to this macro.
After run macro to add a column on left.
In each row down, if there are two codes to add phrase 'Book Ends' and if only one code or no codes for that week to leave blank.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks