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.

Column AColumn B
102
empty - should be filled with '10'6
4578
empty - should be filled with '45'12
empty - should be filled with '45'34
empty - should be filled with '45'55
empty - should be filled with '45'99
340
empty - should be filled with '34'11
empty - should be filled with '34'4
empty - should be filled with '34'7
empty - should be filled with '34'3
empty - should be filled with '34'0
empty - should be filled with '34'90

<tbody>
</tbody>
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
46,530
Office Version
  1. 365
Platform
  1. Windows
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.
 
Status
Not open for further replies.

Watch MrExcel Video

Forum statistics

Threads
1,109,360
Messages
5,528,245
Members
409,809
Latest member
VICKRAM

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top