+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    07-19-2007
    Posts
    3

    URGENT (at work) and CLUELESS.

    I am trying to produce a bar chart that shows the distribution of monthly returns. This is basically a graph that shows the frequency of the number of consecutive months where a positive ROI (return on investment) was achieved and the frequency of the number of consecutive months where a negative ROI was achieved. (i.e. the labels on my x-axis read "0 to 2 months", "2 to 4 months", "4 to 6 months", etc... and the y-axis shows the frequency of these periods.)

    The problem is that I only have the raw data (i.e. the actual ROIs) and was wondering if it is possible to create a formula that allows me to calculate a frequency of consecutive negative or positive periods.

    If this is possible could you please try and explain it to me.

    If you do not understand what I have written just post what you don’t understand and I will try to explain it.

    Thanks

  2. #2
    Registered User
    Join Date
    07-19-2007
    Posts
    3

    URGENT - Stuck at work!

    I am trying to produce a bar chart that shows the distribution of monthly returns. This is basically a graph that shows the frequency of the number of consecutive months where a positive ROI (return on investment) was achieved and the frequency of the number of consecutive months where a negative ROI was achieved. (i.e. the labels on my x-axis read "0 to 2 months", "2 to 4 months", "4 to 6 months", etc... and the y-axis shows the frequency of these periods.)

    The problem is that I only have the raw data (i.e. the actual ROIs) and was wondering if it is possible to create a formula that allows me to calculate a frequency of consecutive negative or positive periods.

    If this is possible could you please try and explain it to me.

    If you do not understand what I have written just post what you don’t understand and I will try to explain it.

    Thanks

  3. #3
    Forum Guru
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    maybe some thing like the attached is a start

    create a column of 0s or 1s depending on if the value is positive, i have taken 0 roi to not be positve and hence return a 0
    if you then do an if statement in the next column say if the value is not 0 then add it to the value above. This gives you the value of consequetive increases

    then in the table these values are added up. The problem is that a run of 5 conseqetive months will also produce a count of a 4, a 3, a 2, and a 1 and these then have to be subtracted hence the last column in the table

    Regards

    Dav
    Attached Files Attached Files
    Last edited by Dav; 07-19-2007 at 07:22 AM.

  4. #4
    Forum Guru mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,984
    TilTandWiN

    Please read forum rules - see link below

    Your thread title is invalid
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

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.2.0