+ Reply to Thread
Results 1 to 4 of 4

Count then Multiply

  1. #1
    Registered User
    Join Date
    05-05-2008
    Posts
    9

    Count then Multiply

    Ok I think this one is complicated, I've not figured out how to do it. Here's a sample data field I'm just gonna use simple clothing items for this.


    A2-----B2------C2 --- ..... Z2
    Hat----Shirt --Shoe---- How Much (A number added up from the price list below)


    How many dollars the pieces are worth

    F6 Hat----F7 20
    G6 Shirt---F8 30
    H6 Shoe---F9 45

    The objective for me is to get a total cost if a person wanted to buy certain items. The actual sheet is huge so If statements won't work.

    Any ideas on how to get this to work?
    Last edited by Grasor; 06-19-2008 at 12:35 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =SUMPRODUCT(($F$6:$H$6=$A$2:$C$2)*A3:C3*$F$7:$H$7)

    adjust ranges to suit

    As long as items in A2:C2 are listed in same order as items in F6:H6
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-05-2008
    Posts
    9
    I can't seem to get that one to return a value. Also there seems to be an error in the forumla you gave me or I just don't understand what's going on.

    =SUMPRODUCT(($F$6:$H$6=$A$2:$C$2)*A3:C3*$F$7:$H$7)

    What cells A3:C3 for?

    Also do the arrays all need to be in order to work? Ie. first cell in both is "hat" etc.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by Grasor
    I can't seem to get that one to return a value. Also there seems to be an error in the forumla you gave me or I just don't understand what's going on.

    =SUMPRODUCT(($F$6:$H$6=$A$2:$C$2)*A3:C3*$F$7:$H$7)

    What cells A3:C3 for?

    Also do the arrays all need to be in order to work? Ie. first cell in both is "hat" etc.
    A2:C2 would contain headers.. and A3:C3 would contain quantities of each to buy.

    Yes, the items must be in the same order in both lists.

+ 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