+ Reply to Thread
Results 1 to 3 of 3

how can I imbed sheet names contained in cells into formulas?

  1. #1
    Ted
    Guest

    how can I imbed sheet names contained in cells into formulas?

    I have a spreadsheet which contains a column with account numbers:

    ACCT #
    1 =SUMIF(SheetReference1,Cell,SheetReference1)
    2 =SUMIF(SheetReference2,Cell,SheetReference2)
    3 =SUMIF(SheetReference3,Cell,SheetReference3)
    4 =SUMIF(SheetReference4,Cell,SheetReference4)



    These Account numbers are also the name of sheets.
    I need to use the SUMIF function to extract information from each sheet.
    However, when I copy paste the formula down I have to manually go into each
    cell and change the sheet reference. This can be quite annoying because the
    SUMIF function contains the sheet reference twice. If I could imbed the
    Account Number as a sheet reference I could save myself a lot of typing....

    Does anyone have any suggestions or workarounds?

    --
    Ted

  2. #2
    David Billigmeier
    Guest

    RE: how can I imbed sheet names contained in cells into formulas?

    Use the INDIRECT() function. It takes as an argument a string value for a
    cell reference. For your example, if your account numbers were in column A,
    you could use something like:

    =SUMIF(INDIRECT("SheetReference"&A1),Cell)

    --
    Regards,
    Dave


    "Ted" wrote:

    > I have a spreadsheet which contains a column with account numbers:
    >
    > ACCT #
    > 1 =SUMIF(SheetReference1,Cell,SheetReference1)
    > 2 =SUMIF(SheetReference2,Cell,SheetReference2)
    > 3 =SUMIF(SheetReference3,Cell,SheetReference3)
    > 4 =SUMIF(SheetReference4,Cell,SheetReference4)
    >
    >
    >
    > These Account numbers are also the name of sheets.
    > I need to use the SUMIF function to extract information from each sheet.
    > However, when I copy paste the formula down I have to manually go into each
    > cell and change the sheet reference. This can be quite annoying because the
    > SUMIF function contains the sheet reference twice. If I could imbed the
    > Account Number as a sheet reference I could save myself a lot of typing....
    >
    > Does anyone have any suggestions or workarounds?
    >
    > --
    > Ted


  3. #3
    Kevin Vaughn
    Guest

    RE: how can I imbed sheet names contained in cells into formulas?

    Not sure I understand, but I put the following both in sheet2 and sheet3 in
    the same range to simulate your account numbers that are the same as sheet
    names:
    sheet2 10
    sheet2 20
    sheet2 30
    sheet2 40
    sheet3 50
    sheet3 60
    sheet3 70

    Then in sheet1 in cells a3 and a4 I put:
    sheet2
    sheet3
    I then put the following formula in b3 and copied down to b4:
    =SUMIF(INDIRECT("'" & A3 & "'!a1:a7"),A3,INDIRECT("'" & A3 & "'!b1:b7"))
    which returned
    100
    180
    So, if this is what you meant in your question, you should be able to adapt
    the formula for your needs.


    --
    Kevin Vaughn


    "Ted" wrote:

    > I have a spreadsheet which contains a column with account numbers:
    >
    > ACCT #
    > 1 =SUMIF(SheetReference1,Cell,SheetReference1)
    > 2 =SUMIF(SheetReference2,Cell,SheetReference2)
    > 3 =SUMIF(SheetReference3,Cell,SheetReference3)
    > 4 =SUMIF(SheetReference4,Cell,SheetReference4)
    >
    >
    >
    > These Account numbers are also the name of sheets.
    > I need to use the SUMIF function to extract information from each sheet.
    > However, when I copy paste the formula down I have to manually go into each
    > cell and change the sheet reference. This can be quite annoying because the
    > SUMIF function contains the sheet reference twice. If I could imbed the
    > Account Number as a sheet reference I could save myself a lot of typing....
    >
    > Does anyone have any suggestions or workarounds?
    >
    > --
    > Ted


+ 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