Announcement

Collapse
No announcement yet.

Show specific text based on number value in other cell

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Show specific text based on number value in other cell

    If anybody can help me with this I'd be very grateful.

    What I want to do is basically assign a flag (based on conditional formatting) according to a number value. Sounds simple.

    I'm looking at birth rates, in 2010 there might be 100. In 2009 there were 99.

    I want to do 3 things. If the percentage change in birth rate between the years is either 0, OR is between 0 and 1, then I want to say it's stable. If it goes up or down by more than a percentage I want it to say "Increase" or "Decrease". It's the between 0 and 1 range I'm having difficulty with.
    The formula I have is along the lines of:

    =IF(AND(AG9>=99,AG9<=101),"stable"),IF(AG9>101,"Increase",IF(AG9<99,"decrease"))

    Not terribly difficult, but's it's driving me mad and I don't have much time..

    Would be very grateful for any pointers
    Last edited by AAE; February 9th, 2011, 22:43. Reason: revise thread title

  • #2
    Re: Displaying &quot;increase&quot;, &quot;decrease&quot; or &quot;stable&quot; depending on number value

    Guessing at your layout:
    =IF(ABS(AG9-AF9)<=1,"Stable",if(AG9>AF9,"Increase","Decrease"))
    Rory
    Theory is when you know something, but it doesnít work. Practice is when something works, but you donít know why. Programmers combine theory and practice: nothing works and they donít know why

    Comment


    • #3
      Re: Displaying &quot;increase&quot;, &quot;decrease&quot; or &quot;stable&quot; depending on number value

      Where ABS is the positve difference between the two? I.e. regardless of whether -1 or +1, the difference being 1?

      I've just tried =IF(AG9>101,"Increase",IF(AG9<99,"decrease","stable")), that works, but I like the abs function

      Comment


      • #4
        Re: Displaying &quot;increase&quot;, &quot;decrease&quot; or &quot;stable&quot; depending on number value

        Correct.
        Rory
        Theory is when you know something, but it doesnít work. Practice is when something works, but you donít know why. Programmers combine theory and practice: nothing works and they donít know why

        Comment

        Working...
        X