View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ker_01 ker_01 is offline
external usenet poster
 
Posts: 395
Default Writing a challenging macro

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

"RobertM" wrote:

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