+ Reply to Thread
Results 1 to 5 of 5

Value in a row are trending up or down?

Hybrid View

Coume Value in a row are trending... 03-23-2010, 06:58 AM
sweep Re: Value in a row are... 03-23-2010, 07:13 AM
Coume Re: Value in a row are... 03-23-2010, 08:29 AM
sweep Re: Value in a row are... 03-23-2010, 08:37 AM
shg Re: Value in a row are... 03-23-2010, 04:30 PM
  1. #1
    Registered User
    Join Date
    08-17-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    31

    Value in a row are trending up or down?

    Hello,

    I was wondering if the below could be done but if it is I have no idea how so any pointer would be welcome.

    I have a row ranging from B2:BO2
    Is there a way to determine if the values are trending up or down?

    Thanks
    Ludo

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Value in a row are trending up or down?

    Hi,

    You can use LINEST to return the gradient of the best fit line to your data to establish the direction of trend.

    =IF(LINEST(B2:BO2,,,TRUE)>0,"Trending Up",IF(LINEST(B2:BO2,,,TRUE)<0,"trending down","Stable"))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    08-17-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Value in a row are trending up or down?

    Excellent! Thanks.

    I works on some lines but not on all of them as my data are not continuous there are some blank cells

    I tried to do something like that with OFFSET:
    =LINEST(OFFSET('Unit Shipped'!B2:BO2,0,0,COUNT('Unit Shipped'!B2:BO2),1),,,TRUE
    and to come up with something with ISNUMBER but I am still stuck
    =LINEST(IF(ISNUMBER('Unit Shipped'!B2:BO2),'Unit Shipped'!B2:BO2,0),,,TRUE)
    Any idea on how to use linest on these, will be more than welcome

    Ludo

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Value in a row are trending up or down?

    Hi,

    This array formula should do it.

    =IF(LINEST(IF(ISNUMBER(B2:BO2),B2:BO2,0),,,TRUE)>0,"up",IF(LINEST(IF(ISNUMBER(B2:BO2),B2:BO2,0),,,TRUE)=0,"Stable","Down"))
    This replaces empty cells with zero, which will alter the gradient, so may affect you results depending on the amount and magnitude of the data present.

    Remember to commit an array formula using CTRL, SHIFT and ENTER
    Last edited by sweep; 03-23-2010 at 08:37 AM. Reason: quote instead of code

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Value in a row are trending up or down?

    Or =LINEST(B2:BO2), which returns the slope

    Or =CHOOSE(SIGN(LINEST(B2:BO2)) + 2, "Down", "Stable","Up")

    Both entered normally.
    Entia non sunt multiplicanda sine necessitate

+ 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