+ Reply to Thread
Results 1 to 6 of 6

Crafting an IF statement that checks multiple values in one column

  1. #1
    Registered User
    Join Date
    12-12-2019
    Location
    Japan
    MS-Off Ver
    Pro Plus 2010
    Posts
    23

    Crafting an IF statement that checks multiple values in one column

    Column K counts 'signals', the presence of several criteria being met. Column L indicates two possible outcomes after a signal, depending on subsequent numbers either increasing or decreasing.

    Usually column K increases then L returns either a value P or N and at the end the total number of Ps and Ns is equal to the amount of signals. However sometimes K increases again before the criteria in L is met, meaning than the total number of P and N values in L no longer matches K.

    Is there any tweak I can make to the formula in K to prevent the value increasing if a P or N hasn't occurred since the last time the count went up by 1? The closest I've been able to get is to suspect that wrapping it in an IF statement that checks whether the current count is equal to the current total of Ps and Ns, but I'm not quite sure how to create this and there may be a better way.

    Attached is an example showing this situation occurring.

    Thanks for any pointers or advice,

    Gareth
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,477

    Re: Crafting an IF statement that checks multiple values in one column

    There is a contradiction in your logic. Column K and column L, which comes first?
    Quote Originally Posted by garethlittle View Post
    ...Usually column K increases then L returns ...
    says L depends on K
    But:
    Quote Originally Posted by garethlittle View Post
    However sometimes K increases again before the criteria in L is met
    Quote Originally Posted by garethlittle View Post
    Is there any tweak I can make to the formula in K to prevent the value increasing if a P or N hasn't occurred since the last time the count went up by 1
    says K depends on L
    Look like "Chicken and eggs, which comes first?"
    Quang PT

  3. #3
    Registered User
    Join Date
    12-12-2019
    Location
    Japan
    MS-Off Ver
    Pro Plus 2010
    Posts
    23

    Re: Crafting an IF statement that checks multiple values in one column

    Thanks for your reply, sorry for not being clear. Column K is independent and L depends on K. K doesn't reference L at all but my thinking was that it may have to check L in order to solve my problem.

    Gareth

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,477

    Re: Crafting an IF statement that checks multiple values in one column

    With this logic, we can ONLY notice if K indicates a values smaller than "P,N" counting.
    K is independent from L, so we can not push K to increase after L.

  5. #5
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Crafting an IF statement that checks multiple values in one column

    Not sure I'm following exactly but does this give you want you want.

    Enter in to K3 as an array formula (Control + shift + enter) then drag down

    Please Login or Register  to view this content.
    Happy with my advice? Click on the * reputation button below

  6. #6
    Registered User
    Join Date
    12-12-2019
    Location
    Japan
    MS-Off Ver
    Pro Plus 2010
    Posts
    23

    Re: Crafting an IF statement that checks multiple values in one column

    Crooza,

    That's it exactly! Thank you so much, I was way off in my thinking.

    Gareth

+ 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] Count values based on multiple checks
    By Reinder in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-29-2018, 03:16 AM
  2. [SOLVED] Can I add multiple tests and value checks in Column formatting
    By Robbie8 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-15-2016, 04:18 PM
  3. If/then statement that checks multiple columns then averages?
    By kixgil in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-17-2015, 10:50 PM
  4. [SOLVED] If Statement that checks two cells
    By Richard_Thornton in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2015, 08:50 AM
  5. COUNTIF statement with 3 criteria checks
    By Malvaro in forum Excel General
    Replies: 4
    Last Post: 06-04-2006, 06:45 PM
  6. [SOLVED] if-then statement that checks for existence of series 2
    By danz98 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-24-2005, 05:05 PM
  7. If-then statement that checks for existence of series 2
    By danz98 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2005, 02:05 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