+ Reply to Thread
Results 1 to 10 of 10

How to use formula to select those cases that meet some criteria?

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    How to use formula to select those cases that meet some criteria?

    Hi, I need to select cases in my file which satisfy some criteria. It is attached here.

    Basically, I am only interested in these cases which:

    1) date within year 2012,
    2) there is some figure for sales, profit or growth (i.e. not all fields are error).

    I don't want to manually do this as there are so many cases like this. So some Excel formulae will be preferred.

    Can you please have a look?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: How to use formula to select those cases that meet some criteria?

    What do you mean when you say you want to 'select' them - do you literally want Excel to select the rows that contain those companies?

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to use formula to select those cases that meet some criteria?

    One possibility:

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


    You could also combine some COUNTIFS (given .xlsx).

    To simplify I would suggest storing a COUNT on each row - eg =COUNT(C2:E2) and then use that column in subsequent calculation.

  4. #4
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Re: How to use formula to select those cases that meet some criteria?

    Quote Originally Posted by Andrew-R View Post
    What do you mean when you say you want to 'select' them - do you literally want Excel to select the rows that contain those companies?
    Hi Andrew, when I said 'select', it means I want to pick up all those cases which satisfy the criteria given.

  5. #5
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Re: How to use formula to select those cases that meet some criteria?

    Quote Originally Posted by DonkeyOte View Post
    One possibility:

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


    You could also combine some COUNTIFS (given .xlsx).

    To simplify I would suggest storing a COUNT on each row - eg =COUNT(C2:E2) and then use that column in subsequent calculation.

    Hi, many thanks for the formula which shows the total number of cases which satisfy the criteria. But my question is: HOW TO identify these individual cases and save them? Sorry for this further question as I'm pretty new to Excel.

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to use formula to select those cases that meet some criteria?

    Maybe use C/F on your range
    Condition 1
    Formula is
    Please Login or Register  to view this content.
    Where H2 is the required year, change this to test.
    Then in , say J2, adjust Dons' formula to read H2.
    Attached Files Attached Files
    Last edited by Marcol; 12-26-2012 at 07:53 AM. Reason: amended workbook
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to use formula to select those cases that meet some criteria?

    Sorry, never saw Post #5.

    I've added to the attachment in Post #6, is that now what you need?

  8. #8
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Re: How to use formula to select those cases that meet some criteria?

    Quote Originally Posted by Marcol View Post
    Maybe use C/F on your range
    Condition 1
    Formula is
    Please Login or Register  to view this content.
    Where H2 is the required year, change this to test.
    Then in , say J2, adjust Dons' formula to read H2.
    Hi Marcol, your formulae really worked! Thanks for your help

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to use formula to select those cases that meet some criteria?

    Hi Marcol, trust you're keeping well ?

    FWIW... reason I used TEXT rather than YEAR in SUMPRODUCT is that former will not explicitly coerce - i.e entering a non-numeric value into the "date" column would cause a YEAR based formula to Error (#VALUE) whereas TEXT based formula would simply ignore and handle accordingly.

  10. #10
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to use formula to select those cases that meet some criteria?

    Good to see you back Don!

    This forum sorely misses you, and other "Big Guns", keeping us upstarts in our place.
    Lately here, it's been like the blind leading the blind.

    All the best for 2013, hope to see more of you then.

    Blianadh Bha Ur.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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