+ Reply to Thread
Results 1 to 7 of 7

Find and update multiple sheet tabs with new data based on range of cell values.

  1. #1
    Registered User
    Join Date
    03-17-2017
    Location
    GIlroy, California
    MS-Off Ver
    ms office 10
    Posts
    4

    Find and update multiple sheet tabs with new data based on range of cell values.

    Hello, I am attempting to update several sheet tabs simultaneously. The sheet tabs have variable names based on a range of cell values from a master worksheet (named "Matrix") here is what I am trying to accomplish.
    1. sheet "Matrix" range of names already entered (i12:z12)
    2. find sheet tab with associated name in range (each name has its own sheet tab)
    3. update found sheet by coping cells from sheet1 "Matrix" and coping to found sheet. (copied cells are both a set range and the column associated with the found name)
    4. repeat for all remaining names within original range

    This is probably a little confusing,please ask me for clarification if needed. I appreciate all the help that can be provided. Thank you.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    12-05-2015
    Location
    Akron, OH
    MS-Off Ver
    15.0
    Posts
    424

    Re: Find and update multiple sheet tabs with new data based on range of cell values.

    I'm a little unclear, but what does make sense is a few functions you can build on in order to accomplish your tasks. So how about:
    1: A Function to return a sheet, based on a string input (the name of the sheet)
    2: A Subroutine to call that function for each cell in range (i12:z12) that contains content that exactly matches a sheet name in ThisWorkbook
    3: A Subroutine to change the name of a worksheet
    4: A Subroutine to copy content into that/a new worksheet (input1: Worksheet To Copy To, input2: Worksheet To Copy From)
    5: A Subroutine to delete a worksheet based upon the worksheet name passed to the subroutine

    ...and then just put it all together, in the scope of a subroutine that utilizes each building block properly.
    <---If my answer helped, please click *

  3. #3
    Forum Contributor
    Join Date
    12-05-2015
    Location
    Akron, OH
    MS-Off Ver
    15.0
    Posts
    424

    Re: Find and update multiple sheet tabs with new data based on range of cell values.

    1: A Function to return a sheet based on a string input (not debugged):

    Please Login or Register  to view this content.
    Note: Will return Nothing if no sheet found so code this function is called upon may need to consider that
    Last edited by joe31623; 03-20-2017 at 03:52 PM.

  4. #4
    Forum Contributor
    Join Date
    12-05-2015
    Location
    Akron, OH
    MS-Off Ver
    15.0
    Posts
    424

    Re: Find and update multiple sheet tabs with new data based on range of cell values.

    2: A Subroutine to call that function for each cell in range (i12:z12) that contains content that exactly matches a sheet name in ThisWorkbook

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-17-2017
    Location
    GIlroy, California
    MS-Off Ver
    ms office 10
    Posts
    4

    Re: Find and update multiple sheet tabs with new data based on range of cell values.

    I am still trying to utilize the code you sent but I believe my ignorance is getting the best of me. I will keep working.

  6. #6
    Forum Contributor
    Join Date
    12-05-2015
    Location
    Akron, OH
    MS-Off Ver
    15.0
    Posts
    424

    Re: Find and update multiple sheet tabs with new data based on range of cell values.

    Don't use my code until you can use code to do what you want to ONE worksheet.

    Focus on the problem by forgetting I ever wrote that code and write code to operate on one worksheet -- the only thing I omitted b/c I was not clear what you wanted.

    Even if you can't get the code write, write out what you want to do with pseudocode/descriptions broken up into several steps.



    Note: Ignorance isn't an issue if you ask the right questions.
    Last edited by joe31623; 03-20-2017 at 05:00 PM.

  7. #7
    Forum Contributor
    Join Date
    12-05-2015
    Location
    Akron, OH
    MS-Off Ver
    15.0
    Posts
    424

    Re: Find and update multiple sheet tabs with new data based on range of cell values.

    For Instance:

    Store Worksheet Named "XYZ" into variable wsSheetToCopy_From
    Store Worksheet Named "UVW" into variable wsSheetToCopy_To
    Copy All Content from ws..._From to ws..._To

    ...or

    Store Worksheet Named "XYZ" into variable wsSheetToCopy_From
    Store Worksheet Named "UVW" into variable wsSheetToCopy_To
    Copy All Content from ws..._From to ws..._To, excluding rows 1-15, etc.

+ 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. Update a sheet based on cell values
    By amitabha0107 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-25-2016, 07:57 AM
  2. Replies: 1
    Last Post: 07-04-2015, 06:25 AM
  3. How to update sheet tabs based on the file name
    By karstens in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-04-2014, 02:31 AM
  4. [SOLVED] Update a cell based on the values in multiple cells
    By RobJay in forum Excel General
    Replies: 5
    Last Post: 09-10-2014, 03:35 AM
  5. Replies: 1
    Last Post: 07-24-2013, 11:51 AM
  6. Macros to update cell values based on multiple criterias
    By ccernat in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-22-2012, 03:25 AM
  7. [SOLVED] Macro to change multiple sheet tabs color based on a cell value
    By greywu1f in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-19-2012, 10:31 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