+ Reply to Thread
Results 1 to 6 of 6

macro pasting data in incorrect row

  1. #1
    Forum Contributor
    Join Date
    01-05-2010
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    747

    macro pasting data in incorrect row

    I would like to change the outrow in my formula to begin pasting data into row 31 on the DMM Averages Tab. Right now it is pasting the data into row 3 on the DMM Averages Tab. Can anyone help with this?

    This is the past of the code that needs to be modified.

    Please Login or Register  to view this content.
    Entire Code

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: macro pasting data in incorrect row

    Hello rhudgins,

    The macro will now start at "A31", your second data table. The change has been made to the attached workbook.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    01-05-2010
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    747

    Re: macro pasting data in incorrect row

    Thank you for your help but the macro is starting at "A1" not "A31". Any idea why?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: macro pasting data in incorrect row

    Hello rhudgins,

    Sorry about that, I was in a bit of a hurry. 30 needs to be added to OutRow because Match returns the relative position in the Array. The array now starts at row 31 but the first match on row 31 will return a 1 because it was found in the first row of the array.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-05-2010
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    747

    Re: macro pasting data in incorrect row

    Thanks this is perfect.

    One more question. The range of data will expand over time to (1, 18), (1, 19)..ect and ("B36:S36"), ("B36:T36") ect...

    Is there a way to change this part of the code so that I will not have to constantly edit the macro anytime my range of data expands?

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    01-05-2010
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    747

    Re: macro pasting data in incorrect row

    Is there anyway that this can be done?

+ 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