+ Reply to Thread
Results 1 to 5 of 5

Copy values in to next blank row with a loop

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Copy values in to next blank row with a loop

    I want to add some vba code to the button on the attcahed example.

    All notes on what I want it to achieve are on the 'coupon' worksheet.

    If anything is unclear please let me know.

    Thanks,
    Adam.
    Attached Files Attached Files

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Copy values in to next blank row with a loop

    If anything is unclear please let me know.
    All of it ...

    What are you trying to achieve?

  3. #3
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Copy values in to next blank row with a loop

    Firstly, I should perhaps point out that this is purely an example.

    The values in I and J will not all be the same in reality and the data in 'Selections!A2:X600' will not just be 'x'. Formulas in Column P will change based on the different values entered in to Y2 and Y4.

    The macro will create a worksheet ready to be saved as csv file for uploading in to an IT system.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Copy values in to next blank row with a loop

    Try this in a standard module, run as a macro, or connect to a button if you must.
    Please Login or Register  to view this content.
    Is that what you mean?
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Copy values in to next blank row with a loop

    Thanks Marcol. This is on the right lines but needs what I would think is a slight amendment.

    The values from columns I and J want to be inserted in to cells Y2 and Y4 of the 'Selections' worksheet not 'Temp Selections' then all values copied over to the next blank row in 'Temp Selections' (values and number formats).

    As you can see from this slightly amended example the values in column P change dependent on the values in Y2 and Y4 so this is why the values from columns I and J need to be inserted to 'Selections' first and then the values of A2:X600 pasted in to the 'Temp Selections sheet. Then repeating the process for the next row on the coupon until we reach the bottom of the list.
    Attached Files Attached Files

+ 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