Writing a challenging macro

R

RobertM

Hello: I'm trying to write a macro using Tools/Macro/Record New Macro. Here's
the problem. The spreadsheet that I'm working with has information in the
cells in one row of columns A-H. Then in column I there is related info that
will show up for serveral rows. A-H will be blank. This works well if you
look at the spreadsheet, but I need to populate these empty cells with the
related info. I need to have the macro copy the information in the cells in
the row down to populate the empty cells. The macro then needs to stop and
repeat the process when it comes to another row where the cells are populated
with data. I'm trying to get this macro to prepare spreadsheet data for use
in an access database.

This was quite difficult to explain. I hope this makes sense.

Thank you,
Robert
 
K

ker_01

Try this as a starting point; you will have to decide whether you want to
cycle each column separately, or use a larger range instead of the single
cell shown here.
Aircode:

For FillRow = 1 to 100
If Sheet1.range("A" & FillRow).value<>"" then
DefaultEntry = Sheet1.range("A" & FillRow).value
Else
Sheet1.range("A" & FillRow).value =DefaultEntry
endif
Next
 

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