+ Reply to Thread
Results 1 to 10 of 10

workbook question

  1. #1
    Jackie
    Guest

    workbook question

    Hi!
    If have a workbook with 4 sheets. 1st sheet named total and each sheet
    after 1..2..3... I have an amount in each worksheet 1,2,3 in cell a1 that I
    want to add together in a cell on the total sheet
    I know that you could put in =sum(1!a1+2!a1+3!a1) in a cell on the total
    sheet and you would get the totals for all three sheets ... but here's the
    question - is there anyway you could right the formula to pick up any future
    sheets that you would add to the workbook without having to change the
    formula on the total sheet? kind of like an infinity type of thing? -- as
    always you help is greatly appreciated!!!
    Jackie

  2. #2
    Forum Contributor
    Join Date
    12-12-2005
    Posts
    667
    Click on Data, Consolidate...
    Best regards,

    Ray

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    =SUM(Sheet1:Sheet3!A1)

    So if you had two sheets change Sheet 3 to Sheet 5

    or this array (ctrl + shift + enter)

    =SUM(N(INDIRECT("Sheet"&{1,2,3}&"!"&"A1")))

    VBA Noob

  4. #4
    Leo Heuser
    Guest

    Re: workbook question

    "Jackie" <[email protected]> skrev i en meddelelse
    news:[email protected]...
    > Hi!
    > If have a workbook with 4 sheets. 1st sheet named total and each sheet
    > after 1..2..3... I have an amount in each worksheet 1,2,3 in cell a1 that
    > I
    > want to add together in a cell on the total sheet
    > I know that you could put in =sum(1!a1+2!a1+3!a1) in a cell on the total
    > sheet and you would get the totals for all three sheets ... but here's the
    > question - is there anyway you could right the formula to pick up any
    > future
    > sheets that you would add to the workbook without having to change the
    > formula on the total sheet? kind of like an infinity type of thing? --
    > as
    > always you help is greatly appreciated!!!
    > Jackie



    Hi Jackie

    One way:

    1. Insert a dummy sheet (not to contain data) to the
    extreme right.
    2. Name it e.g. X
    3. In a cell in sheet "Total": =SUM(1:X!A1)
    4. When you insert a new sheet, insert it between
    sheet("1") and sheet("X")



    --
    Best regards
    Leo Heuser

    Followup to newsgroup only please.



  5. #5
    Jackie
    Guest

    Re: workbook question

    thank you so much for your help -- but I was wondering if you could tell me
    what I am doing wrong. I put in the formula
    =sum(n(indirect("sheet"&{1,2,3}&"!"&"A1"))) and saved it cntrl shift enter to
    make it an array. it works -- but only adds the sheets 1,2,3 ... what
    whould I do to have it add any additional sheets automatically? -- I don't
    want to have to go into the formula and add 4,5,etc. each time I add a sheet
    to the workbook... thank again!
    --
    Jackie


    "VBA Noob" wrote:

    >
    > =SUM(Sheet1:Sheet3!A1)
    >
    > So if you had two sheets change Sheet 3 to Sheet 5
    >
    > or this array (ctrl + shift + enter)
    >
    > =SUM(N(INDIRECT("Sheet"&{1,2,3}&"!"&"A1")))
    >
    > VBA Noob
    >
    >
    > --
    > VBA Noob
    > ------------------------------------------------------------------------
    > VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
    > View this thread: http://www.excelforum.com/showthread...hreadid=570976
    >
    >


  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Sorry

    Yes you would

    VBA Noob

  7. #7
    Leo Heuser
    Guest

    Re: workbook question

    Didn't my answer reach your newsserver?

    Leo heuser

    "Jackie" <[email protected]> skrev i en meddelelse
    news:[email protected]...
    > thank you so much for your help -- but I was wondering if you could tell
    > me
    > what I am doing wrong. I put in the formula
    > =sum(n(indirect("sheet"&{1,2,3}&"!"&"A1"))) and saved it cntrl shift enter
    > to
    > make it an array. it works -- but only adds the sheets 1,2,3 ... what
    > whould I do to have it add any additional sheets automatically? -- I don't
    > want to have to go into the formula and add 4,5,etc. each time I add a
    > sheet
    > to the workbook... thank again!
    > --
    > Jackie
    >
    >
    > "VBA Noob" wrote:
    >
    >>
    >> =SUM(Sheet1:Sheet3!A1)
    >>
    >> So if you had two sheets change Sheet 3 to Sheet 5
    >>
    >> or this array (ctrl + shift + enter)
    >>
    >> =SUM(N(INDIRECT("Sheet"&{1,2,3}&"!"&"A1")))
    >>
    >> VBA Noob
    >>
    >>
    >> --
    >> VBA Noob
    >> ------------------------------------------------------------------------
    >> VBA Noob's Profile:
    >> http://www.excelforum.com/member.php...o&userid=33833
    >> View this thread:
    >> http://www.excelforum.com/showthread...hreadid=570976
    >>
    >>




  8. #8
    Ragdyer
    Guest

    Re: workbook question

    That very well might be the case Leo.
    It's been happening quite often in the past couple of weeks.

    On several occasions, I've not been able to find my responses in the groups,
    but had to go to Google to see them.
    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------
    "Leo Heuser" <[email protected]> wrote in message
    news:[email protected]...
    > Didn't my answer reach your newsserver?
    >
    > Leo heuser
    >
    > "Jackie" <[email protected]> skrev i en meddelelse
    > news:[email protected]...
    > > thank you so much for your help -- but I was wondering if you could tell
    > > me
    > > what I am doing wrong. I put in the formula
    > > =sum(n(indirect("sheet"&{1,2,3}&"!"&"A1"))) and saved it cntrl shift

    enter
    > > to
    > > make it an array. it works -- but only adds the sheets 1,2,3 ... what
    > > whould I do to have it add any additional sheets automatically? -- I

    don't
    > > want to have to go into the formula and add 4,5,etc. each time I add a
    > > sheet
    > > to the workbook... thank again!
    > > --
    > > Jackie
    > >
    > >
    > > "VBA Noob" wrote:
    > >
    > >>
    > >> =SUM(Sheet1:Sheet3!A1)
    > >>
    > >> So if you had two sheets change Sheet 3 to Sheet 5
    > >>
    > >> or this array (ctrl + shift + enter)
    > >>
    > >> =SUM(N(INDIRECT("Sheet"&{1,2,3}&"!"&"A1")))
    > >>
    > >> VBA Noob
    > >>
    > >>
    > >> --
    > >> VBA Noob

    >
    >> ------------------------------------------------------------------------
    > >> VBA Noob's Profile:
    > >> http://www.excelforum.com/member.php...o&userid=33833
    > >> View this thread:
    > >> http://www.excelforum.com/showthread...hreadid=570976
    > >>
    > >>

    >
    >



  9. #9
    Leo Heuser
    Guest

    Re: workbook question

    Thanks, RD!

    Regards
    Leo Heuser


    "Ragdyer" <[email protected]> skrev i en meddelelse
    news:[email protected]...
    > That very well might be the case Leo.
    > It's been happening quite often in the past couple of weeks.
    >
    > On several occasions, I've not been able to find my responses in the
    > groups,
    > but had to go to Google to see them.
    > --
    > Regards,
    >
    > RD
    >
    > ---------------------------------------------------------------------------
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > ---------------------------------------------------------------------------
    > "Leo Heuser" <[email protected]> wrote in message
    > news:[email protected]...
    >> Didn't my answer reach your newsserver?
    >>
    >> Leo heuser




  10. #10
    Ragdyer
    Guest

    Re: workbook question

    Forgot to mention that in the groups, I *could* see the OP's answer to me,
    signifying that he *could see* my post.

    Which I would guess means that the MS servers are not synchronizing
    correctly among themselves.
    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------
    "Leo Heuser" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks, RD!
    >
    > Regards
    > Leo Heuser
    >
    >
    > "Ragdyer" <[email protected]> skrev i en meddelelse
    > news:[email protected]...
    > > That very well might be the case Leo.
    > > It's been happening quite often in the past couple of weeks.
    > >
    > > On several occasions, I've not been able to find my responses in the
    > > groups,
    > > but had to go to Google to see them.
    > > --
    > > Regards,
    > >
    > > RD
    > >

    >
    > --------------------------------------------------------------------------

    -
    > > Please keep all correspondence within the NewsGroup, so all may benefit

    !
    >
    > --------------------------------------------------------------------------

    -
    > > "Leo Heuser" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> Didn't my answer reach your newsserver?
    > >>
    > >> Leo heuser

    >
    >



+ 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