Copy cells into range of cells until cell change

G

Guest

In column C is the name of an employee follwowed by lines of data for
that employee with no further data in column C until the next employee. This
sequence repeats itself for 48,000 lines.
Is there a formula/macro that will copy the employee name into the next
row of column C until the name changes and then repeat for the next name?
 
G

Guest

A brute force macro would be something like

sub nmfill()
nm=cells(1,3)
for r = 2 to 48000
if cells(r,3)="" then cells(r,3)=nm else nm = cells(r,3)
next r
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top