+ Reply to Thread
Results 1 to 16 of 16

Simplify a complex formula

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Simplify a complex formula

    It can't hurt!

    Give it a go, and we'll see.

  2. #2
    Registered User
    Join Date
    01-31-2011
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Simplify a complex formula

    The numbers are of course random
    Attached Files Attached Files

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719

    Re: Simplify a complex formula

    If you want to shorten by getting rid of the long "array constant" with the sheet names then one way is to list the sheet names somewhere on your sheet, e.g. in Z2:Z13, and then name that range Sheetlist and use this formula

    =SUMPRODUCT(SUMIF(INDIRECT("'"&Sheetlist&"'!B:B"),$B7,INDIRECT("'"&Sheetlist&"'!"& ADDRESS(1,COLUMN())&":"&ADDRESS(20000,COLUMN()))))

    alternatively you could use a formula to generate the month names, e.g.

    =SUM(SUMIF(INDIRECT(TEXT({1,2,3,4,5,6,7,8,9,10,11,12}*29,"'mmmm'!")&"B:B"),$B7,INDIRECT(TEXT({1,2,3,4,5,6,7,8,9,10,11,12}*29,"'mmmm'!")&ADDRESS(1,COLUMN())&":"&ADDRESS(20000,COLUMN()))))

    ....and using the first version with a simplification of the ADDRESS part....

    =SUMPRODUCT(SUMIF(INDIRECT("'"&Sheetlist&"'!B:B"),$B7,INDIRECT("'"&Sheetlist&"'!"& CELL("address",INDEX(1:20000,0,COLUMN())))))
    Last edited by daddylonglegs; 06-17-2011 at 09:54 AM.
    Audere est facere

+ 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