+ Reply to Thread
Results 1 to 1 of 1

Function for discreet graph

  1. #1
    Registered User
    Join Date
    03-28-2009
    Location
    Beijing, China
    MS-Off Ver
    Excel 2007
    Posts
    1

    Function for discreet graph

    Hi!

    First of all I have never programmed in Excel before. In the attachment you can find my data base and a graph that shows how it shall look later.

    I have itemtypes, intimes and outtimes for a storage area. I need the graphs for the content of the storage for each item and the overall content.

    Here is the function how I would do it in c++ (I got basic knowledge, I think its not the fastes one but I think it should work). I write a new sheet with data I can generate a graph from. Because I never programmed in Excel I dont know how to do it best.

    int totaltime (get from sheet as highest time value or enter manually if much easier)
    int r= (function to get amount of rows with values, get from sheet)

    int content=0
    int a=1 (actual row)
    int t=0 (time)

    while t smallerorequal totaltime

    while a smallerorequal r
    int Value2=0
    get Value 2 from row a, column2
    if Value2=t
    content=content+1
    int Value3=0
    get Value 3 from row a, column3
    if Value2=t
    content=content-1
    a+1
    write t and content in Sheet2 in row t+1 and columns 1 and 2

    t=t+1


    Another proble is that I dont know how to make a dicreet graph in excel. If i make a line I wont have the right graph. Attached you can find a picture how it should look like.

    I am thankful for all responses.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by hsvfan19; 03-28-2009 at 05:49 AM.

+ 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