Copy filled cells in a column to empty cells below - until the next filled cell occures - and so on

Status
Not open for further replies.

TROWKRO

New Member
Joined
Mar 20, 2019
Messages
5
Hi Could anyone help me with the following? I would like to create a VBA that copies the first found value in Column A to the empty cells below - until the next filled cell in Column A occures. Then this value is copied to the empty cells below etc. - until there are no more entries in column B.

Thanks in advance.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]empty - should be filled with '10'[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]45[/TD]
[TD]78[/TD]
[/TR]
[TR]
[TD]empty - should be filled with '45'[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]empty - should be filled with '45'[/TD]
[TD]34[/TD]
[/TR]
[TR]
[TD]empty - should be filled with '45'[/TD]
[TD]55[/TD]
[/TR]
[TR]
[TD]empty - should be filled with '45'[/TD]
[TD]99[/TD]
[/TR]
[TR]
[TD]34[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]empty - should be filled with '34'[/TD]
[TD]11[/TD]
[/TR]
[TR]
[TD]empty - should be filled with '34'[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]empty - should be filled with '34'[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]empty - should be filled with '34'[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]empty - should be filled with '34'[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]empty - should be filled with '34'[/TD]
[TD]90[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Duplicate https://www.mrexcel.com/forum/excel...-below-until-next-filled-cell-occures-so.html

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).

Note that sometimes posts from new users require Moderator approval before you can see them on the public forums. When this happens, you should see a message to that effect when you try to post it.
Please be patient and do not attempt to post the question again.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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