+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    11-14-2008
    Location
    Brooklyn, NY, USA
    Posts
    52

    Thumbs up Value error on sumproduct and sum array formula

    Hi All,

    I have a spreadsheet representing a month where I am trying to figure out different scenarios for employees. One scenario is that an employee could have to move to a temporary position. In that case, I need to calculate the salary payments to temporary employees in a particular work unit. I've tried several different approaches to this problem, but am still getting the error.

    One method has been using this sumproduct formula:
    Code:
    =SUMPRODUCT($P24:$P207="Temp")*($Q$24:$Q$207="A/R")*($AA$24:$AA$207)
    The data in column AA is formatted as currency. The formula results in an error stating that a "value used in this formula is of the wrong data type"

    A different sumproduct formula is used for temps that may be employed in an administrative role:
    Code:
    =SUMPRODUCT(--($P$24:$P$207="Temp"),--ISNUMBER(SEARCH("Admin",$Q$24:$Q$207))*($AA$24:$AA$207))
    That results in the same error as indicated previously

    Finally, I've tried an array formula as well:
    Code:
    =SUM(($P$24:$P$207="Temp")*($Q$24:$Q$207="BSG")*($AA$24:$AA$207))
    That results in "wrong data type error" as well.

    Any ideas? I would guess the problem lay with the data in column AA, but I've tried it as both currency and number data format and neither has worked. Oddly enough, a simple Sumif formula, using the data in column AA seems to work, but an if(sumif( formula does not.

    I've attached a sample spreadsheet. The formulas I'm having problems with begin in L302.

    Thanks in advance for the help

    Cheers,
    Tim
    Attached Files Attached Files
    Last edited by judasdac; 07-16-2009 at 01:38 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    MS 2007
    Posts
    4,972

    Re: Value error on sumproduct and sum array formula

    I would remove the multiplication ("*") and stick with individual arguments e.g.
    Code:
    =SUMPRODUCT(--($P24:$P207="Temp"),--($Q$24:$Q$207="A/R"),($AA$24:$AA$207))
    
    =SUMPRODUCT(--($P$24:$P$207="Temp"),--ISNUMBER(SEARCH("Admin",$Q$24:$Q$207)),($AA$24:$AA$207))
    Does that work for you?
    ChemistB
    My 2¢

    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

  3. #3
    Registered User
    Join Date
    11-14-2008
    Location
    Brooklyn, NY, USA
    Posts
    52

    Re: Value error on sumproduct and sum array formula

    I never considered that could be the problem. It works perfectly! Thanks for the assist ChemistB

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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.2.0