+ Reply to Thread
Results 1 to 2 of 2

should i use formulas or solver or something else?

  1. #1
    Registered User
    Join Date
    07-08-2013
    Location
    Cincinnati, ohio
    MS-Off Ver
    Excel 2010
    Posts
    13

    should i use formulas or solver or something else?

    I posted this question on the excel vba forum and haven't had too much of a response, but there is someone that thinks my problem can be done in excel. Therefore, I figured someone on this forum may be able to help out. Here it is:

    I am unsure of where to start, so here's my problem:

    Here is a sample of the beginning data:

    Date Price
    5/1/2012 122.12
    5/2/2012 121.89
    5/3/2012 123.27
    5/4/2012 121.48
    5/7/2012 121.79
    5/8/2012 123.35
    5/9/2012 124.47
    5/10/2012 125.2
    5/11/2012 123.29
    5/14/2012 122.57
    5/15/2012 120.4
    5/16/2012 119.62
    5/17/2012 118.23
    5/18/2012 117.17
    5/21/2012 119.11
    5/22/2012 120.3
    5/23/2012 125
    5/24/2012 125.52
    5/25/2012 126.43
    5/29/2012 129.54
    5/30/2012 128.81
    5/31/2012 130.25


    I want the program/solver/formula (whatever i need) to start with the earliest date (5/1/2012) and take the beginning price (122.12) and see if there is a higher value in the next 4 (business) days.

    If there is a higher value, then the program should move to that date. This pattern will continue until there is not a higher value in the next 4 (business) days.

    If there is not a higher value, the program needs to calculate a slope test (y2 -y1)/(x2-x1) for each value for the next 14 (business) days.

    For example, the slope for 5/10 and 5/11 is -1.91. The program should only care about slopes =< .02 and => -.02. Therefore, the program would move from price to price until it stopped on 5/23 where the slope between 5/10 and 5/23 is .02.

    Finally, once it has found a slope that meets the parameters, it should output--in text--the dates and prices used in finding the slope, and the dates and prices of the next 3 days after the value of y2, x2 (5/23).

    For example:
    the output should be:
    5/10/2012 125.2
    5/23/2012 125
    5/24/2012 125.52
    5/25/2012 126.43
    5/29/2012 129.54

    Any help would be greatly appreciated; I've been stuck for days.
    Help!.xlsx
    I've attached a workbook

    Thank you!

  2. #2
    Registered User
    Join Date
    07-08-2013
    Location
    Cincinnati, ohio
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: should i use formulas or solver or something else?

    no one can help?

+ 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. macro not keeping solver solutions when solver is successful
    By jimmypants in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2014, 01:45 AM
  2. should i use formulas or solver or something else?
    By blgree8 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-23-2013, 03:31 PM
  3. Can't start Solver. Error message says Solver.xlam already open.
    By DaveHills in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 10-21-2012, 11:02 AM
  4. solver macro + simulation code + not updating solver values
    By sabinemaria in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2012, 11:37 AM
  5. Interesting Solver problem (Solver encounters an error)
    By MrShorty in forum Excel General
    Replies: 3
    Last Post: 12-22-2005, 06:55 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