+ Reply to Thread
Results 1 to 10 of 10

Loop Sheets with VB to copy information from all worksheets to on overview sheet

Hybrid View

MoldyBread Loop Sheets with VB to copy... 07-23-2018, 04:02 AM
humdingaling Re: Loop Sheets with VB to... 07-23-2018, 04:09 AM
MoldyBread Re: Loop Sheets with VB to... 07-23-2018, 04:38 AM
humdingaling Re: Loop Sheets with VB to... 07-23-2018, 07:41 AM
humdingaling Re: Loop Sheets with VB to... 07-24-2018, 12:45 AM
MoldyBread Re: Loop Sheets with VB to... 07-25-2018, 04:45 AM
MoldyBread Re: Loop Sheets with VB to... 07-25-2018, 04:01 AM
AliGW Re: Loop Sheets with VB to... 07-25-2018, 04:04 AM
AliGW Re: Loop Sheets with VB to... 07-25-2018, 04:10 AM
humdingaling Re: Loop Sheets with VB to... 07-26-2018, 04:40 AM
  1. #1
    Spammer
    Join Date
    06-09-2014
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    149

    Loop Sheets with VB to copy information from all worksheets to on overview sheet

    Hi Community,

    thank you already now for even reading about my challenge!!

    I have the following challenge:
    I will have many (more than 100) sheets in my Excel file that all have the same fixed layout. Basically containing contact information like Name, Address, Phone and some additional data and notes. Each Sheetname schould be the contacts person name.
    At the first sheet I would like to have an overview list that lists some of these information. JUMP should be a Hyperlink to click that brings you to the corresponding Sheet.

    Overview sheet:
    Name1, Phone1, Datum1, JUMP
    Name2, Phone2, Datum2, JUMP
    ...

    My first idea was of course just to do it manually
    Overview sheet:
    =Sheetname1!A1, =Sheetname1!A2, =Sheetname1!A3
    =Sheetname2!A1, =Sheetname2!A2, =Sheetname2!A3

    The problem with that solution is that the Sheetname will sometimes change and therefore all links will not function anymore. Also the number of sheets will grow over time.

    I think the better solution would be to fill out the overview sheet automatically.
    I think it should run this way:
    - Loop all sheets
    - For each sheet copy the cell A1, A2, A3 into one column at Overview Sheet
    - Write JUMP in the A4 Overview Sheet and make a JUMP as a hyperlink to the current sheet in the loop (this is the biggest challenge I think!)
    - Jump to next sheet
    - Jump to next column

    Unfortunately my VB skills don't allow me to make it happen :-(
    Maybe one of you is smart enough to put that into a code? That would be really awesome!

    Thank you so much for already for reading about my problem!
    Last edited by MoldyBread; 07-25-2018 at 04:45 AM. Reason: solved

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Loop Sheets with VB to copy information from all worksheets to on overview sheet

    you could actually do this with formulas but your right its probably easier in VBA

    suggest you create a small sample file with 4-5 sheets
    Remember to desensitize the data.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Spammer
    Join Date
    06-09-2014
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    149

    Re: Loop Sheets with VB to copy information from all worksheets to on overview sheet

    Thanks for quick reply.
    I uplodaded an example here: https://quickfileshare.org/7qq/Example.xlsx

    unfortunatley I cannot click on attachement in the reply here. It doesnt open the selection (tested with Chrome, Firefox, IE)

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Loop Sheets with VB to copy information from all worksheets to on overview sheet

    dont click on the attachment icon

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Loop Sheets with VB to copy information from all worksheets to on overview sheet

    made me wait a whole 60 seconds (twice) to download that file

    anyways, here you got
    I've marked up every row with comments so you can see what does what

    Sub Update_Overview()
    
        Dim ws1 As Worksheet 'variable for looping
        Dim ws2 As Worksheet 'set overview worksheet
        
        Dim lRow As Long 'counter to see which row overview is up to
        
        'set overview worksheet
        Set ws2 = Worksheets("Overview")
        
        'clear all previous data on overview
        ws2.Range("A2:D" & Cells.SpecialCells(xlCellTypeLastCell).Row).Clear
            
        lRow = 2 'set last row
        
        'loop every worksheet within workbook
        For Each ws1 In Worksheets
        
            If ws1.Name <> "Overview" Then 'Skip overview sheet
                ws2.Cells(lRow, 1) = ws1.Range("B1") 'Name
                ws2.Cells(lRow, 2) = Format(ws1.Range("B3"), "MM-DD-YYYY") 'date, change format as required i dont know which country you are from
                ws2.Cells(lRow, 3) = ws1.Range("B5") 'Email
                ws2.Hyperlinks.Add Anchor:=ws2.Cells(lRow, 4), Address:="", SubAddress:="'" & ws1.Name & "'!A1", TextToDisplay:="JUMP" 'insert Hyperlink
                lRow = lRow + 1 'increment lRow
            End If
        Next
        
    
    End Sub
    Attached Files Attached Files

  6. #6
    Spammer
    Join Date
    06-09-2014
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    149

    Re: Loop Sheets with VB to copy information from all worksheets to on overview sheet

    Thank you humdingaling a million times!
    With your great explanation I could easily adapt it to my needs and it works
    I am very thankful! This is really the best side of a connected world that people can support each other!


  7. #7
    Spammer
    Join Date
    06-09-2014
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    149

    Re: Loop Sheets with VB to copy information from all worksheets to on overview sheet

    many many thanks. I will try it and give feedback.
    and sorry that I didnt manage the attachments properly.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,375

    Re: Loop Sheets with VB to copy information from all worksheets to on overview sheet

    You do need to attach files here in future - some (many?) forum members will not follow file-sharing links out of security concerns.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,375

    Re: Loop Sheets with VB to copy information from all worksheets to on overview sheet

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  10. #10
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Loop Sheets with VB to copy information from all worksheets to on overview sheet

    sure thing not a problem
    glad to be of assistance


    in the future as Ali mentioned
    please use attachment feature of the site
    your more likely to get responses

+ 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] Formula to copy information from one worksheet to an overview sheet
    By JeninQC in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-12-2017, 10:01 AM
  2. Overview sheet that automatically inserts data from other sheets
    By SiQmA in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2016, 01:17 PM
  3. Overview sheet with data from different sheets
    By franz89 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-19-2015, 07:22 AM
  4. [SOLVED] Macro to copy data from multiple sheets to overview and align results on overview sheet
    By McBree in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2015, 04:01 PM
  5. Resoruce overview - Create new sheet and add to sumif function in exsisting overview
    By Martinbif in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-27-2013, 09:58 AM
  6. [SOLVED] function to add from a overview sheet information to other sheets
    By benjamin.grimm in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-11-2013, 06:42 AM
  7. Replies: 1
    Last Post: 01-29-2013, 09:19 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