+ Reply to Thread
Results 1 to 8 of 8

COUNTIFS formula that works in the same row

  1. #1
    Registered User
    Join Date
    05-28-2016
    Location
    Ottawa, ON
    MS-Off Ver
    2013
    Posts
    4

    Question COUNTIFS formula that works in the same row

    HI, I am trying to get a COUNTIFS formula to work. I'm using Excel 2013.

    I have two worksheets: one called 'TOTALS' and one called 'INVENTORY.'

    I want a formula on the TOTALS worksheet that gets its data from the INVENTORY worksheet.

    Specifically, I want to insert a formula in the TOTALS worksheet that looks for variations on the term "Advocates" in cells I5:I350 in the INVENTORY worksheet. If the term "Advocate" is found, I want the formula to examine the contents of column G in the same row. If the term "Current" appears in column G, the formula should count it as one instance.

    Here's the formula I'm trying to get to work:


    =COUNTIFS(INVENTORY!I5:I350,"*" & "Advocates" & "*",INVENTORY!G5:G350,"Current")

    Any insight would be appreciated. Thank you!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: COUNTIFS formula that works in the same row

    Hi, welcome to the forum

    Hard to say without seeing a sample of what you are working with.

    That should work...
    =COUNTIFS(INVENTORY!I5:I350,"*Advocates*",INVENTORY!G5:G350,"Current")

    Can you actually see entries that should be counted?
    Check for spelling errors with Current?

    If all else fails, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

    O
    P
    Q
    1
    aabb xx
    1
    2
    bbaacc yy
    3
    ccbb xx
    4
    bbaacc yy
    5
    ccbb xx
    6
    bbccaa yy

    Q1=COUNTIFS(O1:O6,"*aa*",P1:P6,"xx")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-28-2016
    Location
    Ottawa, ON
    MS-Off Ver
    2013
    Posts
    4

    Re: COUNTIFS formula that works in the same row

    Thanks so much, Ford.

    I've uploaded the workbook here. The cell that contains the formula I'm trying to get to work is in yellow.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: COUNTIFS formula that works in the same row

    Please upload your file to the forum. Not all members are able - or willing - to access file-hosting sites

  5. #5
    Registered User
    Join Date
    05-28-2016
    Location
    Ottawa, ON
    MS-Off Ver
    2013
    Posts
    4

    Re: COUNTIFS formula that works in the same row

    Apologies - I didn't realize you could attach files to a post. Here it is (I hope). And thanks again!
    Attached Files Attached Files

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: COUNTIFS formula that works in the same row

    The "current" you have in G has a trailing space, and it seems you have a macro running, that when I remove the space, it adds the word back (and back again, even if you just type the word 'current"), The only way I found to fix that was to delete the entry and use the DD again.

    OH and btw, this formula should make it easier to copy what you want...
    =COUNTIFS(INVENTORY!$I$5:$I$350,"*" &$A3 & "*",INVENTORY!$G$5:$G$350,B$2)

  7. #7
    Registered User
    Join Date
    05-28-2016
    Location
    Ottawa, ON
    MS-Off Ver
    2013
    Posts
    4

    Re: COUNTIFS formula that works in the same row

    D'oh -I can't believe I didn't catch that trailing space. The formulas now seem to work properly and I can't thank you enough, but I'll try: thank you!

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: COUNTIFS formula that works in the same row

    Thats OK, it took me a bit to find it too, Im just happy we were able to resolve this for you , so thanks for the feedback

+ 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: 1
    Last Post: 01-08-2015, 07:02 PM
  2. [SOLVED] Sumifs formula giving #value even though each part individually works as a sum formula
    By carrach in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-08-2015, 10:34 AM
  3. how can i make this code works for multiple links it only works for one link
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2014, 08:38 AM
  4. [SOLVED] weekday() result used in an array formula doesn't work. Formula works if i type in date
    By aarco50 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-25-2014, 03:25 PM
  5. Replies: 2
    Last Post: 05-28-2014, 06:52 AM
  6. Replies: 0
    Last Post: 12-16-2011, 09:01 AM
  7. Formula works, but works too well...
    By shaunl in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-04-2006, 02:57 AM

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.6.0 RC 1