+ Reply to Thread
Results 1 to 6 of 6

I need a macro to cycle down in a column and add the row value to a specific cell

  1. #1
    Registered User
    Join Date
    06-24-2013
    Location
    Reading CA
    MS-Off Ver
    Excel 2010
    Posts
    10

    I need a macro to cycle down in a column and add the row value to a specific cell

    The attached work contains 2 sheets. Please disregard the #ref, they are related to other sheets that were deleted to meet the file size criteria. The project Run sheet has a list of projects (this is a variable) that need to be printed. To print them they need to be added to cell A4 (only) on the PSFR sheet. I need help with a macro that will start from A2 on Project Run and end with the last row with data on Project Run. On each instance it will add the project number to the A4 cell on the PSFR sheet.

    Any help that can be given will be greatly appreciated.

    Thanks

    Robert
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: I need a macro to cycle down in a column and add the row value to a specific cell

    need help with a macro that will start from A2 on Project Run and end with the last row with data on Project Run. On each instance it will add the project number to the A4 cell on the PSFR sheet.

    Does it mean all rows 2-45 of sheet project will be added to the same cell A4 of PSFR sheet? Or am missing something?

  3. #3
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: I need a macro to cycle down in a column and add the row value to a specific cell

    HI..

    I think this is what you want..?

    Please Login or Register  to view this content.
    Having said that.. it will smash through the range till Lastrow without pause.. s that what you want?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-24-2013
    Location
    Reading CA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: I need a macro to cycle down in a column and add the row value to a specific cell

    no you are not missing something that is correct. The variable is the number of projects that will be added later. Currently the 40 plus projects will grow to 400

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: I need a macro to cycle down in a column and add the row value to a specific cell

    Ahm,
    If you look at apo's code, it will loop through row 2 to last row and copy the loops in to Range A4, but as all the previous loops will be written over, only the last row will be copied in to A4. So you have over 40 rows and want to copy to A4? I probably lost the plot.

  6. #6
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: I need a macro to cycle down in a column and add the row value to a specific cell

    Your correct AB33..

    I was thinking that rjackson104 would want to intervene the loop and do some thing within each loop.. that was my motive behind saying...
    Reading it again.. he probably wants to print each time it loops?

    Having said that.. it will smash through the range till Lastrow without pause.. s that what you want?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1