Clean up blanks in columns

artz

Well-known Member
Joined
Aug 11, 2002
Messages
830
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I have an input area on a worksheet that is two columns wide, columns O and P. Data are entered or deleted in pairs. I want to clean up gaps when pairs are deleted without upsetting the formatting.

Deleting whole rows is not useable because it effects other parts of the worksheet and the formatting of the input area. I've tried more than a dozen macros that I found online and so far, every one messes up the worksheet.

It seems like the macro should copy, then paste the values one row up into the now blank row. I don't know how it would do this for multiple blank rows in the columns.

Does anyone in the Forum have an idea for a macro that could do this?

Thanks,

Art
 
Hi Rick,

Somehow, my last post is out of order. Anyway, I shared your latest code which works perfectly with someone doing a similar operation. Though I didn't follow the explanation, he commented that your code, could over time, contribute to increasing file size if the user made many changes to the list, i.e., additions and deletions. This sounds absurd to me.

Do you have any idea about this?

Thanks,

Art
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,215,741
Messages
6,126,587
Members
449,319
Latest member
iaincmac

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top