+ Reply to Thread
Results 1 to 5 of 5

Need help with a formula to caculate multiple numbers in a sheet per name

  1. #1
    Forum Contributor
    Join Date
    05-09-2017
    Location
    NC
    MS-Off Ver
    2013
    Posts
    103

    Need help with a formula to caculate multiple numbers in a sheet per name

    It's tough to describe in a title and I did a quick mock up sheet to show what I need.

    Column B shows the names of the sales people
    Column C is the date of sale
    Column D is which red part they sold (Part A or Part B)
    Column E is the points awarded depending on a Red A or Red B
    the remaining columns F thru I follow the same pattern with different colored parts.

    again, this is widgets or whatever.

    Cell S3 should calculate all the points Bob has accumulated in columns E,G and I while ignoring errors, blanks...everything but those numbers.
    Cell T3 for Tom and Cell U3 for Mark.

    I've tried several different ways but even when I get it to work for the first line i have trouble if the sheet was to go past that. I've included a sample sheet. Any help is appreciated.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Need help with a formula to caculate multiple numbers in a sheet per name

    So long as you don't have #na in any of the cells or #value, then with these numbers

    v B C D E F G H I
    2
    3 Name Date Red Part Red pts Blue Part Blue pts Green Part Green pts
    4 Bob 1/1/2019 A 10 B 20 A 15
    5 Tom 4/5/2019 B 5 A 2 A 15
    6 Bob 6/6/2019 B 5 A 30 A 15
    7 Mark 6/7/2019 A 10 A 30 B 25

    and this formula in S3 and copied over to T3 and U3 =SUMPRODUCT(($B$4:$B$7=S2)*(($E$4:$E$7)+($G$4:$G$7)+($I$4:$I$7)))

    You will get the following:

    v S T U
    1 Total pts.
    2 Bob Tom Mark
    3 95 22 65
    4
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Need help with a formula to caculate multiple numbers in a sheet per name

    See attached file.
    I used formula suggested by Alan.
    Modified your formula in cells E4:E7, G4:G7 and I4:I7.
    Typical formula looks like:

    HTML Code: 
    This eliminates #na and other errors.

    Let us know if this works for you.
    Attached Files Attached Files
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  4. #4
    Forum Contributor
    Join Date
    05-09-2017
    Location
    NC
    MS-Off Ver
    2013
    Posts
    103

    Re: Need help with a formula to caculate multiple numbers in a sheet per name

    Thank you both alansidman and modytrane!

    Great help and I learned some new methods I am sure I will be using in the future. My sheet is almost ready yo go live. My only snag will be one of my point cells was a vlookup so I will have to figure out a way to get that not to show an error or I will have to use modytrane's method and just list out each point in the formula.

    Thank you both again

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Need help with a formula to caculate multiple numbers in a sheet per name

    =IFERROR(formula,"")

    will leave a blank. Alternatively, you can use an array formula, with the errors still there:

    =SUMPRODUCT(IFERROR(($B$4:$B$12=S2)*($D$4:$I$12),""))

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 7
    Last Post: 01-05-2016, 01:48 AM
  2. [SOLVED] Caculate commission
    By YasserKhalil in forum Excel General
    Replies: 7
    Last Post: 02-12-2015, 06:14 PM
  3. how to caculate value of each sheet.
    By thaimic in forum Excel General
    Replies: 2
    Last Post: 12-03-2013, 03:40 AM
  4. Caculate only if a button is pressed on the sheet
    By fdelriog in forum Excel General
    Replies: 3
    Last Post: 01-25-2010, 11:18 AM
  5. excel spread sheet wont caculate new data entered in ranges.
    By Art-needs-help in forum Excel General
    Replies: 3
    Last Post: 11-08-2005, 10:10 AM
  6. I Want to Caculate only ONE Cell !!!
    By Mahmoud Metwally in forum Excel General
    Replies: 3
    Last Post: 03-06-2005, 08:46 PM
  7. I Want to Caculate only ONE Cell !!!
    By Mahmoud Metwally in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2005, 05:06 PM

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