+ Reply to Thread
Results 1 to 5 of 5

Copy and paste row to worksheet that matches column name

  1. #1
    Registered User
    Join Date
    04-09-2013
    Location
    London england
    MS-Off Ver
    Excel 2003
    Posts
    5

    Copy and paste row to worksheet that matches column name

    Good afternoon everyone,

    I have a small problem with a macro I am trying to use. Basically, I have a master sheet called grant totals. In this sheet information is entered, obviously, detailing grants that have been awarded for various regions. I then have 6 other sheets titled Cardiff, Swansea, Newport etc etc. What the macro I have below does is look in column J2 where the region name is, and matches is with the sheet names and pastes it to that sheet. It works brilliantly but, it doesn’t find the next available line it simply always copies and pastes in the second row. So if I have information on a grant it will simply overwrite this and not copy and paste below it so a list forms. I hope I have explained this clearly and hope someone, anyone can help!!

    Many thanks



    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 11-12-2013 at 11:28 AM. Reason: Added CODE tags, please take a moment to read the FORUM RULES in the menu bar above. Thanks.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copy and paste row to worksheet that matches column name

    It works brilliantly but, it doesn’t find the next available line it simply always copies and pastes in the second row.
    What does this mean. By looking at your code it should only paste it in the second row (see code line below)
    Please Login or Register  to view this content.
    Please further clarify what you would like to have happen

    Edit: Do you wish to have it loop through each row in column J of sh1 and copy each row over to its respective sheet?

  3. #3
    Registered User
    Join Date
    04-09-2013
    Location
    London england
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Copy and paste row to worksheet that matches column name

    I would like it to post onto the next available line if possible so it forms a list. Forgive me I have little experience with VBA and any guidance would be gratefully received.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copy and paste row to worksheet that matches column name

    Do you mean like this?

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-09-2013
    Location
    London england
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Copy and paste row to worksheet that matches column name

    Works perfectly thank you very much for your time and assistance!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] copy and paste values to another sheet if value in one column matches condition
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-05-2013, 11:36 AM
  2. Copy and Paste last column onto another worksheet
    By pablowilks in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2013, 06:12 PM
  3. Copy & Paste Column with Data in the next available column in the same worksheet
    By BruceBane73 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2013, 12:07 AM
  4. [SOLVED] Copy and Paste a specific Column to a Column that's heading matches a particular cell
    By Rexmond in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2012, 12:29 AM
  5. Macro to Copy & Paste when worksheet names matches
    By Arinp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2012, 06:54 PM

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