Excel Trends :: MrExcel Message Board



 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

Trends
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

Cossie
Board Master


Joined: 07 May 2002
Posts: 141
Location: Sydney, Australia
Flag: Australia

Status: Offline

 Reply with quote  

I need a formula that will return a value of "positive", "negative" or "no trend" from a series of numbers eg. Have tried nested if statements and TREND() but none of thses return the correct result

10 20 30 40 = Positive or
10 09 08 07 = Negative or
10 12 08 15 = No trend.

Any suggestions?

David

Post Tue May 07, 2002 9:25 pm 
 View user's profile Send private message

Yogi Anand
MrExcel MVP


Joined: 13 Mar 2002
Posts: 5440
Location: Michigan USA

Status: Offline

 Reply with quote  


quote:

On 2002-05-07 17:25, Cossie wrote:
I need a formula that will return a value of "positive", "negative" or "no trend" from a series of numbers eg. Have tried nested if statements and TREND() but none of thses return the correct result

10 20 30 40 = Positive or
10 09 08 07 = Negative or
10 12 08 15 = No trend.

Any suggestions?

David





Nothing sofisticated , but for the data set that you presented, a nested IF function would do ...

=IF(AND(B2-A2>0,C2-B2>0,D2-C2>0),"positive",IF(AND(-B2-A2<0,C2-B2<0,D2-C2<0),"negative","notrend"))


_________________
Regards!
Yogi Anand

Post Tue May 07, 2002 9:40 pm 
 View user's profile Send private message

zacemmel
Board Master


Joined: 30 Apr 2002
Posts: 513


Status: Offline

 Reply with quote  

{=IF(SUM(IF((A1:A5>OFFSET(A1:A5,1,0))*(ROW(A1:A5)<>5), 1, 0))=0, "positive", IF(SUM(IF((A1:A5>OFFSET(A1:A5,1,0))*(ROW(A1:A5)<>5), 1, 0))=(COUNTA(A1:A5)-1),"negative", "none"))}

This is an array formula. This can be used with huge ranges of numbers without lots of nested ifs. The only things that have to change are the cell references. Let me know how it goes.

[ This Message was edited by: zacemmel on 2002-05-07 18:11 ]

Post Tue May 07, 2002 10:08 pm 
 View user's profile Send private message MSN Messenger

Cossie
Board Master


Joined: 07 May 2002
Posts: 141
Location: Sydney, Australia
Flag: Australia

Status: Offline

 Reply with quote  

both work excellently thanks for the efforts

Post Wed May 08, 2002 3:37 am 
 View user's profile Send private message

Mark W.
MrExcel MVP


Joined: 11 Feb 2002
Posts: 7146
Location: Austin, Texas USA
Flag: Usa

Status: Offline

 Reply with quote  

As does...

=IF(OR(NOT(INDEX(LINEST(A1:D1),1,1)),INDEX(LINEST(A1:D1,,,1),3,2)),"No Trend",IF(INDEX(LINEST(A1:D1),1,1)<0,"Negative","Postive"))

[ This Message was edited by: Mark W. on 2002-05-08 12:06 ]

Post Wed May 08, 2002 3:34 pm 
 View user's profile Send private message
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.