+ Reply to Thread
Results 1 to 15 of 15

Need help with COUNTIFS and ROWS / SMALL

  1. #1
    Registered User
    Join Date
    03-20-2017
    Location
    czech
    MS-Off Ver
    2013
    Posts
    7

    Need help with COUNTIFS and ROWS / SMALL

    I have this formula but I have discovered that it is picking up rows that I do not want. How for example could I elimate a row if one of the columns contain the word "WRITEOFF" and "ADD NEW"?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Need help with COUNTIFS and ROWS / SMALL

    Hi,

    I'd need a small sample file to be ore precise. Let's assume WRITEOFF could be part of contents in column K.


    In COUNTIFS you could add a new parameter.

    Something like

    ...Transactions!$K$4:$K$475,"<>"&"*WRITEOFF*"

    In SMALL to exclude WRITEOFF

    ...IF(ISERROR(SEARCH("WRITEOFF";Transactions!$K$4:$K$475))...

    Regards
    Last edited by canapone; 03-20-2017 at 01:27 PM.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    03-20-2017
    Location
    czech
    MS-Off Ver
    2013
    Posts
    7

    Re: Need help with COUNTIFS and ROWS / SMALL

    Quote Originally Posted by canapone View Post
    Hi,

    I'd need a small sample file to be ore precise. Let's assume WRITEOFF could be part of contents in column K.


    In COUNTIFS you could add a new parameter.

    Something like

    ...Transactions!$K$4:$K$475,"<>"&"*WRITEOFF*"

    In SMALL to exclude WRITEOFF

    ...IF(ISERROR(SEARCH("WRITEOFF";Transactions!$K$4:$K$475))...

    Regards
    Send me your email and I will send you the file

  4. #4
    Registered User
    Join Date
    03-20-2017
    Location
    czech
    MS-Off Ver
    2013
    Posts
    7

    Re: Need help with COUNTIFS and ROWS / SMALL

    Quote Originally Posted by canapone View Post
    Hi,

    In SMALL to exclude WRITEOFF

    ...IF(ISERROR(SEARCH("WRITEOFF";Transactions!$K$4:$K$475))...
    I cant see how to incorporate this into SMALL. The column just for reference is J. In the Cells C4 and D4 are the month and year inside a drop down list.

  5. #5
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Need help with COUNTIFS and ROWS / SMALL

    ----

    double message: sorry

    ---------
    Last edited by canapone; 03-21-2017 at 01:52 AM.

  6. #6
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Need help with COUNTIFS and ROWS / SMALL

    Hi

    to count excluding ADD NEW and WRITEOFF

    Please Login or Register  to view this content.
    array entered


    In order to get the smallest number from ROW($B$4:$B$474)-ROW($B$4)+1) excluding strings in J4:J474 containing WTRITEOFF or ADDNEW

    Please Login or Register  to view this content.
    Array entered

    To attach a sample file here some instructions.

    http://www.excelforum.com/faq.php?do...l&titlesonly=0


    There are for sure better solutions on the way

    Regards
    Last edited by canapone; 03-21-2017 at 01:57 AM.

  7. #7
    Registered User
    Join Date
    03-20-2017
    Location
    czech
    MS-Off Ver
    2013
    Posts
    7

    Re: Need help with COUNTIFS and ROWS / SMALL

    ok here is a sample file. The only items I want to appear in the ACCT sheet are obviously anything filtered by the month and year and just ITEMS that say "ALFA DENT" and "MAIN"

    https://www.excelforum.com/attachmen...1&d=1490039206
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,546

    Re: Need help with COUNTIFS and ROWS / SMALL

    Try this modification of the array entered formula that is in B7 with this array entered formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    *Array entered formulas are activated by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Registered User
    Join Date
    03-20-2017
    Location
    czech
    MS-Off Ver
    2013
    Posts
    7

    Re: Need help with COUNTIFS and ROWS / SMALL

    Quote Originally Posted by JeteMc View Post
    Try this modification of the array entered formula that is in B7 with this array entered formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    *Array entered formulas are activated by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Let us know if you have any questions.
    I can only assume you tested this formula with the attached file? I enter the formula and it produces a blank result. The logic was to find Alfa-Dent or Main and populate the table in the sheet ACCT dynamically. THerefore the only values that would show are those specified in the criteria and not the totals on the bottom of the Transactions Sheet for example.

  10. #10
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Need help with COUNTIFS and ROWS / SMALL

    Hi again

    Excel 2010 users (and later version) can exploit AGGREGATE

    In I7 to be copied below

    Please Login or Register  to view this content.
    Array status not requested. Just enter to work.

    In B5 you could adjust COUNTIFS as

    Please Login or Register  to view this content.
    "*ALFA-DENT*" asks to count strings containing ALFA-DENT: maybe asteriks (*) are not necessary.

    Please refer to the attachment: I've translated the formulas from a PC with Italian settings.

    Hope it's a little help
    Attached Files Attached Files
    Last edited by canapone; 03-21-2017 at 01:55 AM.

  11. #11
    Registered User
    Join Date
    03-20-2017
    Location
    czech
    MS-Off Ver
    2013
    Posts
    7

    Re: Need help with COUNTIFS and ROWS / SMALL

    This looks great. Many Thanks

    I will play around with it and come back to you if I have any questions.

  12. #12
    Registered User
    Join Date
    03-20-2017
    Location
    czech
    MS-Off Ver
    2013
    Posts
    7

    Re: Need help with COUNTIFS and ROWS / SMALL

    If you get bored maybe you would take a look at my formula in F4 on Main Stock and tell me if this could be made more simple or do I pretty much have it correct?

  13. #13
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Need help with COUNTIFS and ROWS / SMALL

    Ciao,

    I'll take a look.

    Greetings from Firenze

  14. #14
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Need help with COUNTIFS and ROWS / SMALL

    Hi, I'm not able to integrate C4 as last choice into segment

    {"ALFA-DENT"."WRITEOFF ALFA"."TRANSFER TO MAIN"."STOCK ADJUST MINUS AD"."STOCK ADJUST PLUS AD"."TRANSFER TO ALFA"}


    I'm sure you have good reasons for using INDIRECT: I do not have the complete picture of your job.

    I'm using a SUMIF instead of

    VLOOKUP($C4,'STOCK HISTORY MAIN'!F:G,2,FALSE)


    Please Login or Register  to view this content.
    Hope it helps
    Attached Files Attached Files

  15. #15
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,546

    Re: Need help with COUNTIFS and ROWS / SMALL

    I can only assume you tested this formula with the attached file?
    Indeed I did and the attached is what I get.
    Let us know if you have any questions.
    Attached Files Attached Files

+ 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] How do I repeat the small row next to the big rows?
    By emilio911 in forum Excel General
    Replies: 8
    Last Post: 02-24-2017, 02:36 PM
  2. [SOLVED] Number of rows too small now
    By KausBorealis in forum Excel General
    Replies: 2
    Last Post: 06-14-2016, 01:16 AM
  3. Using Small to find other columns/rows in the data
    By rpinxt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-25-2016, 11:27 AM
  4. [SOLVED] How to add necessary rows to a small sheet when pasting from another
    By blackspiral in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2014, 10:53 AM
  5. =small function and sorting by rows
    By phillyd023 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-13-2014, 07:21 AM
  6. Replies: 0
    Last Post: 12-16-2011, 09:01 AM
  7. if..small..rows - logic issue
    By jw01 in forum Excel General
    Replies: 9
    Last Post: 12-09-2011, 02:18 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