Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Challenging Formula. Need help with writing a formula tom Excel Worksheet Functions 3 July 1st 07 05:50 PM
Challenging Macro to perform evaluate function on each cell qwertyjuan Excel Programming 5 November 20th 05 07:30 PM
writing macro CN New Users to Excel 2 August 2nd 05 06:16 PM
Need Help writing a macro TwEaKFrEaK[_4_] Excel Programming 1 August 24th 04 10:16 PM
Macro Emailing Challenging Problem Sandip Excel Programming 1 July 10th 03 08:25 PM


All times are GMT +1. The time now is 07:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"