+ Reply to Thread
Results 1 to 8 of 8

Copy And Paste From One Tab To Other Tabs Based On Tab Name

  1. #1
    Registered User
    Join Date
    03-10-2021
    Location
    Manchester
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Question Copy And Paste From One Tab To Other Tabs Based On Tab Name

    Hi,

    I'm stuck on a bit of VBA and I've been told you guys are the best so lets hope you can help me out.

    (1) I have a workbook with a tab called Data on it, this list lots of organisations in col A (and other data up to col H).

    (2) I also have different tabs in same workbook named after the individual organisations.
    i.e. in point (1) above the list will contain all the data for Asda, Tesco Lidl etc and the individual tabs will be named Asda, Tesco, Lidl etc.

    (3)What I'm trying to do is have a VBA macro button which when pressed, the data from the Data tab is copied and pasted into the relevant tabs
    i.e. the data for Asda from the Data tab is copied into the Asda tab on row3, the data for Tesco is copied into the Tesco tab. etc etc.

    (4)I would also like to leave the full data in the Data tab as well please.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Copy And Paste From One Tab To Other Tabs Based On Tab Name

    Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your Data sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. This macro is triggered automatically when you enter a value in column H and press the RETURN key. So start by filling in all the data in any row from column A to column G and lastly enter the data in column H and press the RETURN key.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    03-10-2021
    Location
    Manchester
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Re: Copy And Paste From One Tab To Other Tabs Based On Tab Name

    Thanks for the very quick prompt,

    Is there a way to have it as a macro that runs after clicking a button please as I will be pasting data dumps in the Data sheet from sql to start with.

    I want the users to only populate the tabs once they have made any late amendments to the Data sheet.

    Also will the data paste on row 3 as I dont think the above is doing that.

    Thanks again.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Copy And Paste From One Tab To Other Tabs Based On Tab Name

    Try:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-10-2021
    Location
    Manchester
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Re: Copy And Paste From One Tab To Other Tabs Based On Tab Name

    Thank you, this is brilliant, you are definitely the expert.

    Please ignore the issues you might have received via email as I have manage to walk through and fix them.

    one last thing if you have time please.

    How do I get to copy all the text in the tab but exclude the first column as I dont need that in the individual tabs.

    thanks
    Last edited by Ummy2021; 03-11-2021 at 05:56 AM.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Copy And Paste From One Tab To Other Tabs Based On Tab Name

    Try:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-10-2021
    Location
    Manchester
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Re: Copy And Paste From One Tab To Other Tabs Based On Tab Name

    That is exactly what I needed, thank you.

    Saved me a lot of time so really grateful.

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Copy And Paste From One Tab To Other Tabs Based On Tab Name

    You are very welcome.

+ 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] Find Last Row on Subsequent Tabs for Copy/Paste
    By sherylt13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2018, 10:04 PM
  2. Copy 1st and 3rd tabs and paste it on the 5th tab
    By celeazul in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2016, 05:57 PM
  3. how to copy and paste when you have two Internet Explorer tabs
    By Verbamore in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2014, 02:23 PM
  4. [SOLVED] copy Tabs, based on two criteria in column J and paste values
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-13-2013, 03:46 PM
  5. Copy and Paste all tabs from one workbook to another
    By MissaLissa in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-02-2013, 02:53 PM
  6. [SOLVED] Add new tabs and then Search copy & paste VBA,
    By dave1983 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-17-2012, 08:34 PM
  7. [SOLVED] Autofilter, copy, paste in tabs
    By mgnickel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-12-2011, 04:21 PM

Tags for this Thread

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