Delete empty cells bit shift to the right

soyti

New Member
Joined
Oct 17, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am looking for a way to delete cells (usually blank cells), and after deleting, the other cells will shift right. My main purpose is to align all data to the right because I am data cleaning.

We all know that deleting cells only gives 2 options, shift left or shift right.

Is this possible without vba? If VBA is necessary, can you share the code?
 

Attachments

  • RDT_20241017_1947047147697309125322221.jpg
    RDT_20241017_1947047147697309125322221.jpg
    164.7 KB · Views: 29

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Well, first of all I guess the picture is the desired result, but you're moving cells to right only if in the column H is empty or another criteria? Can you clarify this?

Regards,
GB
 
Upvote 0
I want them to move to the right after all empty cells are deleted. Meaning all cells with data, after deleting all blank cells, will be beside each other with no blank cells in between any of them.

What I do is, I select a range, then select only blank cells using Control G. Then right click and delete cells, BUT I want to shift right. It's like, he opposite of delete cells - shift left.
 
Upvote 0
I still find your explanation a big confusing.
Can you show us an example, with the following 2 images?
1. What your data looks like to start.
2. What your desired output should look like.

I thought maybe that is what you were trying to show in your initial picture, but the pictures do not seem to correspond with your description.
 
Upvote 0
Welcome to the MrExcel board!

We all know that deleting cells only gives 2 options, shift left or shift right.
I have to disagree, though I assume you just made a typo when writing the statement. ;)

1729292998308.png



I do agree with Joe's request though
Can you show us an example, with the following 2 images?
1. What your data looks like to start.
2. What your desired output should look like.
 
Upvote 0

Forum statistics

Threads
1,223,104
Messages
6,170,124
Members
452,303
Latest member
c4cstore

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