+ Reply to Thread
Results 1 to 6 of 6

not getting expected result

  1. #1
    Forum Contributor
    Join Date
    10-27-2013
    Location
    Ireland
    MS-Off Ver
    Microsoft 365
    Posts
    403

    not getting expected result

    im trying to get an number when i calculated but instead of giving me an i expected answer it gives me 0 - this is my formula - ive highlighted in bold where the problem is

    =COUNTIFS('Shirt Database'!$A$2:$A$10000,A684,'Shirt Database'!$O$2:$O$10000,"table",'Shirt Database'!$F$2:$F$10000,{"Started","*on","*off","on Off"})



    thank you for helping

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: not getting expected result

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

    BSB

  3. #3
    Forum Contributor
    Join Date
    10-27-2013
    Location
    Ireland
    MS-Off Ver
    Microsoft 365
    Posts
    403

    Re: not getting expected result

    thank you but no it returns #Value!

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: not getting expected result

    Could you attach a sample workbook so we can better see what the issue is?

    BSB

  5. #5
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: not getting expected result

    I cannot explain why the original formula returns zero and the modified formula returns #VALUE.

    But your count will be incorrect, regardless.

    When all other conditions are true and the corresponding F2:F10000 contains "on off", it will be counted twice because it matches both "*off" and "on off".

    -----

    Your original formula might return zero because there is no row where all conditions are true in column A, O and F.

    Your formula counts one (or two by mistake) for each row in 2:10000 where column A equals A684, and column O equals "table", and column F equals "started" or "on off" or ends with "on" or "off".

    Is that your intent?

    But as BSB noted, you must SUM the COUNTIFS results in order to get the full count.

    Without SUM, your formula returns only the count of cells in each row in 2:10000 where column A equals A684, column O equals "table", and column F equals "started".

    Perhaps there is no such row.

    -----

    The modified formula might have returned #VALUE because you did not apply the suggestion correctly. Always show us each formula that you use.

    Following BSB's suggestion, the modified formula should be:

    Please Login or Register  to view this content.
    Last edited by joeu2004; 03-30-2018 at 08:57 AM. Reason: minor

  6. #6
    Forum Contributor
    Join Date
    10-27-2013
    Location
    Ireland
    MS-Off Ver
    Microsoft 365
    Posts
    403

    Re: not getting expected result

    thanks guys much appreicated...... it works a treat now thanks again

+ 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. For-Looping with Range.Offset - Not Getting Expected Result
    By Maki in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-15-2015, 06:17 AM
  2. Getting zero when a non-zero result is correct and expected.
    By fred3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-30-2014, 12:05 AM
  3. Macro returns expected result
    By cossie2k in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-09-2012, 08:25 AM
  4. VLookup not returning expected result
    By tenscourts in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2012, 10:04 AM
  5. COUNTIF not returning expected result
    By zpenacho in forum Excel General
    Replies: 3
    Last Post: 01-20-2012, 06:37 PM
  6. SUMIF - not returning expected result
    By Paul Sheppard in forum Excel General
    Replies: 4
    Last Post: 08-16-2011, 11:43 AM
  7. [SOLVED] Using sum(1/countif....) not returning expected result
    By Kent (thanks) in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 05-11-2006, 11:40 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