+ Reply to Thread
Results 1 to 5 of 5

Formula that assigns value of one if a number transition through a border.

  1. #1
    Registered User
    Join Date
    04-17-2014
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    17

    Formula that assigns value of one if a number transition through a border.

    Hello,

    I would like to ask you how to assign a value of 1 (and 0 otherwise) if there was a change in the value of a variable, so that it was 10 or below 10 in the previous year, but in the next year got bigger then 10. I would also like to assign 1 if the value was 11 or bigger than 11 and is now smaller than 11.

    In other words, I care for the borderline between 10 and 11 and whether the value of the variable trespassed that borderline, then it should trigger a change from 0 to 1.

    Each observation has unique ID - which is a name and a year.

    I have uploaded the excel file with the IDs and the values.

    Thanks a lot!
    Attached Files Attached Files

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Formula that assigns value of one if a number transition through a border.

    Using your posted workbook...
    This regular formula, copied down, flags sequential changes that cross the 10/11 threshold
    Please Login or Register  to view this content.
    EDITED TO INCLUDE THIS SIMPLER ALTERNATIVE:
    Copied down
    Please Login or Register  to view this content.
    Is that something you can work with?
    Last edited by Ron Coderre; 05-16-2014 at 02:11 PM.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    04-17-2014
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Formula that assigns value of one if a number transition through a border.

    Thank you Ron, it works.

    However, I would like to get 1 only if the name of the firm is the same (the name of the firm is the latter in front of the year). In other words, A2002...A2006 should be treated separately from AAA2002...AAA2006. Not every cross of the border is important to me, only the crosses that correspond to the same firm.

    Any idea how to do that?

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Formula that assigns value of one if a number transition through a border.

    Ah...I must have missed that in your original request.
    This regular formula, copied down, flags when a specific company prefix crosses the threshold
    Please Login or Register  to view this content.
    Does that help?

  5. #5
    Registered User
    Join Date
    04-17-2014
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Formula that assigns value of one if a number transition through a border.

    Thanks, Ron it is a big progress and the result is almost the same as the one I am looking for. The small change than I need is that under column "Was 10 or below 10 and is now bigger than 10" one is assigned only when the number was (0...10) and is now bigger than 10. Under column "Was 11 or above 11 and is now lower than 11" I would like one to be assigned only in the cases, in which the number was 11 or above 11 and is now (0...10).

    Because now I get one whenever the number crosses the borderline. However, I care for the history of the number as well.

    Thanks a lot for helping with this!

+ 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: 2
    Last Post: 06-02-2013, 09:39 AM
  2. Transition Formula Evaluation with Lotus 1-2-3 rules in Excel 2013 ?
    By FlyUK in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-01-2013, 01:46 AM
  3. [SOLVED] If formula that then looks up and assigns a value from a range....
    By stanja in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-28-2012, 01:34 PM
  4. Transition formula entry in Excel 2007?
    By jeffery_frick in forum Excel General
    Replies: 2
    Last Post: 11-05-2009, 10:31 PM
  5. Excel 2007 : Excel formula that assigns color
    By shohreh in forum Excel General
    Replies: 1
    Last Post: 04-26-2009, 12:05 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