I need to copy the data from the top row of a worksheet to all those empty rows underneath it UNTILL you get to a row that has data…then start over and copy that new data into the empty rows….and so on…

I have the code that we've written so far attached and below is an example of the data (a row with info...then blank rows that need to be filled with the above info...)

I'm not so good at this, but if anyone has any suggestions, please let me know :)
THanks
Jen

16296 INV BALLESTER CONSULTI 4541 29-Jun-07


13518 INV BEST RESEARCH 4271 23-Apr-07


13963 INV BLAUW RESEARCH 4298 30-Apr-07


14250 INV BLAUW RESEARCH 4298 15-May-07

10889 INV BRAINJUICER BV 2270 25-Jan-07

dim intColumn as integer
intColumn = 1
dim cellvalue as string
dim lastcellvalue as string
lastcellvalue = vbnullstring
for i = 1 to 1000000

cellvalue = cells(i,intColumn)

if cellValue = vbnullstring then
cells(i, intColumn) = lastcellvalue
else
lastcellvalue = cells(i, intColumn)
endif

next i

hope that helps!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.