+ Reply to Thread
Results 1 to 5 of 5

Distinguish whether the next number down is <20 (but not including the current number)

  1. #1
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Distinguish whether the next number down is <20 (but not including the current number)

    Hello,

    In column A i have employee ID numbers.
    In column B, I have an event list.

    I would like column C to detect when...
    ...the word "Transfer" is mentioned in column B...
    ...whilst beside it in column A the number is less than 20...and...
    ...the next 2 numbers down are also less than 20, BUT at least one of those numbers are different to the initial number.

    So for example:
    4 Transfer [POSITIVE RESULT]
    4 Apple
    7 Banana


    BUT
    4 Transfer
    4 Apple
    4 Banana
    Will have No Result

    I would like the word used to be "Positive Result" please.

    Thank you

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Distinguish whether the next number down is <20 (but not including the current number)

    In C1:
    If(and(B1="Transfer",A1<20,countif(A1:A3,"="&A3)<3),"Positive Result","No Result")

  3. #3
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Distinguish whether the next number down is <20 (but not including the current number)

    =IF(AND(B2="Transfer",COUNTIF(A3:A4,A2)<2,COUNTIF(A2:A4,"<20")=3),"Positive Result","")
    Please click the * icon below if I have helped.

  4. #4
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Re: Distinguish whether the next number down is <20 (but not including the current number)

    you almost got it yudlugar...
    its still giving a positive result when one of the numbers down is the same number and the other is over 20.

    for example:
    10 Transfer
    10 Apple
    28 Banana
    should not give a positive result, because there is a number above 20.

    Remember, if both numbers down are less than 20 and at least one of them is not the same as the transfer number, then its positive.
    Both numbers down HAVE to be less than 20

    i hope ive explained that well.
    thank you for your assistance
    Last edited by tlacloche; 09-25-2013 at 12:25 PM.

  5. #5
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Re: Distinguish whether the next number down is <20 (but not including the current number)

    You got it melvinrobb. Thank you!!!

+ 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: 14
    Last Post: 04-06-2015, 09:19 PM
  2. [SOLVED] Remove everything in a Cell to the right of the first number, including that num
    By Trevasaurus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-05-2012, 01:26 AM
  3. Replies: 6
    Last Post: 08-08-2012, 09:49 AM
  4. [SOLVED] count them number of cells between values -2 and 2 including 0
    By Helppppppppppppppppppppppppppppp in forum Excel General
    Replies: 2
    Last Post: 03-28-2006, 02:45 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