+ Reply to Thread
Results 1 to 10 of 10

Summary Sheet from Multiple Worksheets or Creating a Formula based on text

  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    Leeds, England
    MS-Off Ver
    MAC 2011
    Posts
    4

    Post Summary Sheet from Multiple Worksheets or Creating a Formula based on text

    Morning All.

    This is my first post to the Forum, my name is Dave and I've been using Excel for 15 years now.

    The one thing I've never been able to really achieve is a summary sheet based on Worksheet names.

    For example I have 5 worksheets. Named "001", "002", "003" etc.

    I want to create another workbook which summarises all the data from each worksheet. i.e.

    A B
    001 £233 £12
    002 £200 £10
    003 £300 £5

    I think I managed this years ago with a text string converted to a formula


    Has anyone ever tried what I'm trying? Also it would be good if this could recognise new worksheets.

    Pulling what's left of my hair out trying to figure this out.

    Many Thanks

    Dave

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Summary Sheet from Multiple Worksheets or Creating a Formula based on text

    Would you want to try it using VBA? It will be very simple and fast.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Summary Sheet from Multiple Worksheets or Creating a Formula based on text

    You'll need to use the INDIRECT function, so if, say, cell A1 contained the value "001" then:

    =INDIRECT(A1 & "!A1")

    Would return the value in cell A1 on the sheet "001".

    Or you could do something like:

    =SUM(INDIRECT(A1 & "!A:A"))

    Which would sum all of the values in column A on sheet "001".

    Does that point you in the right direction?

  4. #4
    Registered User
    Join Date
    08-16-2012
    Location
    Leeds, England
    MS-Off Ver
    MAC 2011
    Posts
    4

    Re: Summary Sheet from Multiple Worksheets or Creating a Formula based on text

    Hi Andrew

    Thanks for that. In all these years I've never used the INDIRECT function.

    What would I need to do if the sheetname had a space in it? i.e. "003 - Dave"

    Thanks Again

    Dave

    ---------- Post added at 11:48 AM ---------- Previous post was at 11:47 AM ----------

    Hi Arlette

    I'll give the VB option a go as well if you have some code. Will it work ok on MAC?

    Thanks

    Dave

  5. #5
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Summary Sheet from Multiple Worksheets or Creating a Formula based on text

    If the sheet name has a space in, e.g. "003 - Dave" (still in cell A1) you'd have to enclose it in single quotes in the INDIRECT:

    =INDIRECT("'" & A1 & "'!A1")

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Summary Sheet from Multiple Worksheets or Creating a Formula based on text

    I am not sure if it will work on a MAC as i have never used one.

  7. #7
    Registered User
    Join Date
    08-16-2012
    Location
    Leeds, England
    MS-Off Ver
    MAC 2011
    Posts
    4

    Re: Summary Sheet from Multiple Worksheets or Creating a Formula based on text

    Quote Originally Posted by Andrew-R View Post
    If the sheet name has a space in, e.g. "003 - Dave" (still in cell A1) you'd have to enclose it in single quotes in the INDIRECT:

    =INDIRECT("'" & A1 & "'!A1")
    Fantastic! Thanks Andrew!

    Many Thanks

    Dave

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Summary Sheet from Multiple Worksheets or Creating a Formula based on text

    @ dsunter

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Summary Sheet from Multiple Worksheets or Creating a Formula based on text

    If you need code, try this
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button

  10. #10
    Registered User
    Join Date
    08-16-2012
    Location
    Leeds, England
    MS-Off Ver
    MAC 2011
    Posts
    4

    Re: Summary Sheet from Multiple Worksheets or Creating a Formula based on text

    Quote Originally Posted by Cutter View Post
    @ dsunter

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Sorry, all done

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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