+ Reply to Thread
Results 1 to 2 of 2

Chart converting date to year

  1. #1
    Registered User
    Join Date
    10-31-2006
    Posts
    27

    Chart converting date to year

    Hello,

    I have the following question regarding excel and I was hoping someone out here could help me:

    I want to make a graph with years on the x-axis and an amount on the y-axis. I have dataset consisting of two columns. One of the two columns (A) is a date (f.e. 14 March 2001) and the other column (B) contains number (f.e. 1).

    Here comes my problem: For each year in my dataset I want to have the total of column B as a datapoint. Because my dataset is to large to manually add all the datapoints per year I am looking for some way to add datapoints belonging to a certain year.

    So for example, this is what I have:

    Date (A)--> Amount(B)
    12-02-2005--> 1
    05-05-2005--> 2
    06-04-2006--> 3
    06-05-2006--> 4
    06-03-2006--> 5
    01-01-2007--> 8

    Now I want to show this in a graph, which is similar to the following table:

    Year (x axis)--> Total Amount (y axis)
    2005--> (1+2=) 3
    2006--> (3+4+5=) 12
    2007--> 8

    Thank you for your help!

    Regards,

    Edward

  2. #2
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    somewhere - I will assume in e1 through e3 list your years (2005, 2006, 2007) - the list can be longer if required.

    Now, assuming your dates are in a1:a100 and the data is in b1:b100, and assuming the dates are dates and not text

    in f1 enter

    =sumproduct((year($a$1:$a$100)=e1)*($b$1:$b$100))

    and copy down through f3 (or lower if more years are listed)

    if the dates are listed as text, change to this in f1

    =sumproduct((right($a$1:$a$100,4)=e1)*($b$1:$b$100))
    not a professional, just trying to assist.....

+ 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