kiaheyrati038
New Member
- Joined
- Dec 3, 2021
- Messages
- 3
- Office Version
- 2021
- Platform
- Windows
this code works great and deletes empty rows and shifts things up
But the problem is that it also shifts anything below the L28 up and it ruins the rest of my file. any idea to just move the values up instead of shifting the whole row up and screwing the rest of worksheet?
VBA Code:
sub test()
with range("L12:L28")
for i=.rows.count to 1 step -1
if isempty(.cells(i,1)) then .rows(i).delete shift:=xlup
next
end with
end sub
But the problem is that it also shifts anything below the L28 up and it ruins the rest of my file. any idea to just move the values up instead of shifting the whole row up and screwing the rest of worksheet?