Consulting

Results 1 to 5 of 5

Thread: Solved: referencing a tab name in a sumproduct formula

  1. #1
    VBAX Regular
    Joined
    Apr 2007
    Location
    Saluda SC
    Posts
    23
    Location

    Solved: referencing a tab name in a sumproduct formula

    I am trying to reference the tab name in Column A(Employee A, EmployeeB, Employee C, ....) of sheet F0301QA00810 to sum the total of each employee that has F0301QA00810 in column K by using sumproduct.

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    [VBA]=SUMPRODUCT(--(INDIRECT("'" & A4 & "'!K3:K99")=Sheet4!$A$3),INDIRECT("'" & A4 & "'!L3:L99"))[/VBA]
    in C4 and copy down.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Try

    =SUMIF(INDIRECT("'"&$A4&"'!K:K"),$A$3,INDIRECT("'"&$A4&"'!L:L"))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    VBAX Regular
    Joined
    Apr 2007
    Location
    Saluda SC
    Posts
    23
    Location
    Thank you very much p45cal. That did the trick. I appreciate your help very much.

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    So does the SUMIF, and SUMIF is far more efficient than SUMPRODUCT.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •