Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Writing a challenging macro
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Challenging Formula. Need help with writing a formula | Excel Worksheet Functions | |||
Challenging Macro to perform evaluate function on each cell | Excel Programming | |||
writing macro | New Users to Excel | |||
Need Help writing a macro | Excel Programming | |||
Macro Emailing Challenging Problem | Excel Programming |