Consulting

Results 1 to 3 of 3

Thread: Solved: More on SumProduct

  1. #1
    VBAX Expert
    Joined
    Aug 2004
    Posts
    810
    Location

    Solved: More on SumProduct

    I have this formula:
    [vba]
    =SUMPRODUCT(--(PivotSource!$R$2:$R$642<>"N/A")*((PivotSource!$R$2:$R$642="High Level")+(PivotSource!$R$2:$R$642="Low Level")+(PivotSource!$R$2:$R$642="High Pressure")+(PivotSource!$R$2:$R$642="Low Pressure")+(PivotSource!$R$2:$R$642="High Temp")+(PivotSource!$R$2:$R$642="Low Temp")+(PivotSource!$R$2:$R$642="Misdirected Flow"))*(PivotSource!$AA$2:$AA$642=$A4))
    [/vba]

    Is there a way to shorten it? Basically, if I can compare using an array of items, I don't know if SumProduct can do that.

    Thanks

  2. #2
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    =SUMPRODUCT((PivotSource!$R$2:$R$642={"High Level","Low Level","High Pressure","Low Pressure","High Temp","Low Temp","Misdirected Flow"})*(PivotSource!$AA$2:$AA$642=$A4))
    Be as you wish to seem

  3. #3
    VBAX Expert
    Joined
    Aug 2004
    Posts
    810
    Location
    Thank you, worked like a charm

Posting Permissions

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