+ Reply to Thread
Results 1 to 6 of 6

Can a macro transfer data to tabs with same name found in column of master sheet?

  1. #1
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Can a macro transfer data to tabs with same name found in column of master sheet?

    I started with the code below and it was finished by Mumps1 (thanks again). I’ve been researching the forum/web and reading but can’t find what functions would help with the next part of this report.

    The code below looks at column “D”, creates tabs for each unique value and names columns.

    The next goal is to fill in the tabs created with the values from the master tab. So if you look over “Sheet1” you will see the first rows should go under tab “123456”. Here is the tricky part:

    Sometimes the account number found in column “D” will be found in column “K” or “M”. If the account number in column “D” equals the account number in column “K” then the amount should be placed under debit. If the account number in column “D” equals the account number in column “M” then the amount should be placed in the credit column.

    I can’t find anything like this on the web so I’m not sure if it’s even possible. Any guidance is appreciated.

    Please Login or Register  to view this content.
    *Separate question – I tried to change this:


    Please Login or Register  to view this content.
    to:


    Please Login or Register  to view this content.
    and got errors, know why?
    Attached Files Attached Files
    Last edited by AccountingJ; 03-27-2018 at 03:11 PM.

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Can a macro transfer data to tabs with same name found in column of master sheet?

    HTML Code: 
    and got errors, know why?


    When you put something in quotes "", the program looks for that text string as worksheet name. It looks like you are trying to make that a variable. You may want to declare a text string i.e. actwks and add

    somethind like,
    actwks = ActiveWorkbook.Activesheet

    then use
    HTML Code: 
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  3. #3
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Can a macro transfer data to tabs with same name found in column of master sheet?

    I am not sure about the syntax.
    It may have to be

    actwks = ActiveWorkbook.Activesheet.name

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,164

    Re: Can a macro transfer data to tabs with same name found in column of master sheet?

    Hi this should do what you are asking for as well as replacing your code
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Re: Can a macro transfer data to tabs with same name found in column of master sheet?

    Thank you both, modytrane I didn't catch what you found (I appreciate the time you took).

    Fluff13, if I could give you a fist bump somehow, I would. This helps a lot. I will study and keep this.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,164

    Re: Can a macro transfer data to tabs with same name found in column of master sheet?

    Glad to help & thanks for the feedback

+ 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. Excel, transfer data from Master Sheet to sub sheets, using key word from column
    By anvqui in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-16-2015, 02:35 PM
  2. Replies: 1
    Last Post: 06-16-2015, 01:25 PM
  3. Replies: 1
    Last Post: 06-16-2015, 12:43 PM
  4. Replies: 1
    Last Post: 09-15-2014, 01:03 PM
  5. [SOLVED] Need macro that can transfer data to the next row of the master sheet
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2013, 01:36 PM
  6. Macro to Transfer data from multiple sheets into rows on a master sheet
    By serrone in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-30-2013, 06:35 AM
  7. Macro to copy data from master sheet if match is found
    By shraddha5 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 02-08-2013, 02:17 AM

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