Autofill column blank cells: Fill the blank cell with the closest cell with a value above it.

kevinlarey

New Member
Joined
Mar 5, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi!

I'm trying to figure out if there's a VBA or formula that I can autofill the blank cells in column B by taking the closest cell with a value above the blank cell and paste it.
When there is only one cell to fill, it's easy to use a formula but when there is multiple cells such as B13-B17, I can't find a way to paste TNT-4004 in all of those cells.

I don't want to manually double click the bottom right corner for each cell (TNT-4001, TNT-4002, TNT-4003, TNT-4004) since I have to do this for 100,000+ lines.

I'm really hoping there is a solution for this!

Thank you!
 

Attachments

  • 2.PNG
    2.PNG
    10 KB · Views: 63

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
If cell is truly blank (which if cell has a space in it, it won't pick up a true blank)
On the home tab, on the far right should have "Find & Select"
"Go to Special"
Select "Blanks"
Click ok
All the blanks are now highlighted on the sheet
Go to the formula bar
Enter =
Then click on the cell above the blank with data in it
Then hold down Control button and hit enter.
 
Upvote 0
Solution
If cell is truly blank (which if cell has a space in it, it won't pick up a true blank)
On the home tab, on the far right should have "Find & Select"
"Go to Special"
Select "Blanks"
Click ok
All the blanks are now highlighted on the sheet
Go to the formula bar
Enter =
Then click on the cell above the blank with data in it
Then hold down Control button and hit enter.
Hi Noxqss38242:

Wow! Thank you so much!

Such a simple solution but I was able to save a couple hours!

Thank you!
 
Upvote 0

Forum statistics

Threads
1,214,787
Messages
6,121,558
Members
449,038
Latest member
Guest1337

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