+ Reply to Thread
Results 1 to 17 of 17

COUNTIFS Trouble

  1. #1
    Registered User
    Join Date
    02-13-2017
    Location
    California
    MS-Off Ver
    2016
    Posts
    11

    COUNTIFS Trouble

    Guys,

    I'm trying to count my sales teams units. However I'm having a difficult time inputting a COUNTIFS formula

    If there are two people tied to a sale, I want to be able to give them a credit of 1/2 versus a full amount if the names are different in two columns.

    For example, since Jack split a deal on a new item, I want to be able to count 1/2 of it since the column over has another sales person tied to it.

    data.PNG


    Thanks in Advance guys.

  2. #2
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    166

    Re: COUNTIFS Trouble

    Can you attach a spreadsheet?

  3. #3
    Registered User
    Join Date
    02-13-2017
    Location
    California
    MS-Off Ver
    2016
    Posts
    11

    Re: COUNTIFS Trouble

    See the attached item.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    166

    Re: COUNTIFS Trouble

    I'm stumped. I'm trying to do this, but it's coming out as 3 and not 3.5

    =COUNTIFS($A$2:$A$12,"NEW",$B$2:$B$12,"JACK")+COUNTIFS($A$2:$A$12,"NEW",$C$2:$C$12,"JACK")-((COUNTIFS($A$2:$A$12,"NEW",$B$2:$B$12,"JOAN")+COUNTIFS($A$2:$A$12,"NEW",$C$2:$C$12,"JOAN"))*0.5)

  5. #5
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    166

    Re: COUNTIFS Trouble

    Never mind - I wasn't accounting for the 'used' in my check. So this would work.

    There's got to be a more elegant way to do it though.

  6. #6
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    166

    Re: COUNTIFS Trouble

    In the used column: =COUNTIFS($A$2:$A$12,"USED",$B$2:$B$12,"JACK")+COUNTIFS($A$2:$A$12,"USED",$C$2:$C$12,"JACK")-(((COUNTIFS($A$2:$A$12,"USED",$B$2:$B$12,"JOAN")+COUNTIFS($A$2:$A$12,"USED",$C$2:$C$12,"JOAN")))*0.5)

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,725

    Re: COUNTIFS Trouble

    Edit Disregard. This is wrong. Please see next post.

    Another way.

    Under "New" in E2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Under "Used" in F2
    Formula: copy to clipboard
    Please Login or Register  to view this content.




    E
    F
    1
    JACKS NEW SALES
    JACKS USED SALES
    2
    2
    0.5
    Last edited by FlameRetired; 10-18-2018 at 07:56 PM. Reason: Mistake in formula and interpretation.
    Dave

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,725

    Re: COUNTIFS Trouble

    With changes to the headers array enter this in E3. Fill down and across.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    D
    E
    F
    1
    New
    Used
    2
    JACKS NEW SALES
    JACKS USED SALES
    3
    Jack
    3
    0.5
    4
    Joan
    1
    0.5
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-13-2017
    Location
    California
    MS-Off Ver
    2016
    Posts
    11

    Re: COUNTIFS Trouble

    Stupid question, in the MMULT array, does it have to be in the same page of excel? I'm on a different tab and replacing your input and I'm not having any success. I'm going to try another sheet and post in a second to see if you can help.

  10. #10
    Registered User
    Join Date
    02-13-2017
    Location
    California
    MS-Off Ver
    2016
    Posts
    11

    Re: COUNTIFS Trouble

    Nevermind, for some reason substituted the formula =SUM(MMULT(($B$2:$C$12="JACK")*($A$2:$A$12="NEW"),{1;1}/2)) when I replaced "JACK" with a cell number i.e. A2 it didn't work. It's working and pulling numbers now but I'm not sure if it's right still...

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,725

    Re: COUNTIFS Trouble

    OK.

    If you get into trouble let us know, post another WB, and no, being in a different tab shouldn't affect anything.

  12. #12
    Registered User
    Join Date
    02-13-2017
    Location
    California
    MS-Off Ver
    2016
    Posts
    11

    Re: COUNTIFS Trouble

    Ok, I tried handwriting it, and copied the formula. I'm not sure if I completely understand the Array portion. I tried copying the format, but I should've indicated that I am pulling this not from another workbook, but same workbook, different sheet. I can't seem to get it to go. Can you help with this? See attached.
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    166

    Re: COUNTIFS Trouble

    I'm not quite clear what you are trying to do, since your 'sheet2' has 'John Smith', so I just referenced exactly the same stuff, just indicating the sheet in the formula. If you input this in Sheet2 A2 it should work.

    {=SUM(IF((Sheet1!$B$2:$C$12=Sheet1!$D3)*(Sheet1!$A$2:$A$12=Sheet1!E$1),1/(MMULT(--(Sheet1!$B$2:$C$12<>""),{1;1}))))}

  14. #14
    Registered User
    Join Date
    02-13-2017
    Location
    California
    MS-Off Ver
    2016
    Posts
    11

    Re: COUNTIFS Trouble

    Let me try this. I have a dashboard on my excel sheet, the first sheet pulls data dumps from the second page. Sorry if I wasn't more clear just very anxious to get this done. Thanks a lot for all your help guys!

  15. #15
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,725

    Re: COUNTIFS Trouble

    You were combining the criteria in single cells. While this could be resolved in formula with first name only it makes for very a complicated and awkward formula. With the inclusions (sometimes) of last name it might be next to impossible.

    It is best to keep the criteria separate as in the attached. NEW/USED as column headers and the names as row headers ... column C in the attached.

    Note the inclusion of the source sheet name in the formula where applicable. Rather than trying to hand type the formula click on the square icon just above this formula "box". It selects the whole formula without fail. Copy and then paste into the workbook formula bar. Then Ctrl + Shift + Enter.

    Array entered.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  16. #16
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,725

    Re: COUNTIFS Trouble

    Quote Originally Posted by adlx72 View Post
    Let me try this. I have a dashboard on my excel sheet, the first sheet pulls data dumps from the second page. Sorry if I wasn't more clear just very anxious to get this done. Thanks a lot for all your help guys!
    This needs more clarification.

    The intent of the second sheet (Sheet2) appears to be to pull from the first sheet (Sheet1). That statement appears to say the opposite.

    What am I missing?

  17. #17
    Registered User
    Join Date
    02-13-2017
    Location
    California
    MS-Off Ver
    2016
    Posts
    11

    Re: COUNTIFS Trouble

    Thanks so much, that worked! You guys are awesome. I had some user errors that were holding me back.

+ 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. [SOLVED] Sumproduct to replace countifs as countifs don't work on external source reference
    By KrishnaSagar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2017, 02:33 AM
  2. Trouble with COUNTIFs
    By motteh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-04-2016, 03:43 PM
  3. [SOLVED] Countifs trouble across multiple rows & columns
    By punkaholicgravy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-17-2015, 09:55 AM
  4. Trouble with COUNTIFS
    By HPIMICHAEL02 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-22-2013, 02:25 PM
  5. Trouble with COUNTIFS() formula
    By neoshaakti in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-20-2013, 08:49 AM
  6. Excel 2007 : Trouble with Countifs
    By jayres14 in forum Excel General
    Replies: 3
    Last Post: 03-09-2012, 09:51 AM
  7. Replies: 0
    Last Post: 12-16-2011, 09:01 AM

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