+ Reply to Thread
Results 1 to 3 of 3

Help with IF formula for dates

  1. #1
    Registered User
    Join Date
    02-16-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007
    Posts
    7

    Help with IF formula for dates

    Hello,

    i have a problem sorting my data, and i think it can be done quite easily if one is good at excel and IF formulas. Here is a sample of my dataset:

    01.02.2003... 2 ... -
    01.02.2003... - ... 1
    01.02.2003... - ... 2
    01.03.2003... 2 ... -
    01.03.2003... 2 ... -
    01.03.2003... 2 ... -
    01.03.2003... 1 ... -
    01.04.2003... 3 ... -
    01.04.2003... - ... 5
    01.04.2003... - ... 2

    What i wish to do is sum up for each date, column 2 - colum 3, giving me a summation of total column2 - column3 for each day of the year. i have several years worth of observations, so this has to be done automatically, in excel 2007.
    There are not the same number of observations each day.

    a wanted result would then be:
    date ----------- c2 -- c3 - Sum
    01.02.2003 ... 2... -
    01.02.2003 ...- ...1
    01.02.2003... -... 2 ... -1
    01.03.2003... 2... -
    01.03.2003... 2... -
    01.03.2003... 2... -
    01.03.2003... 1... - ... 7
    01.04.2003 ... 3 ... -
    01.04.2003 ... - .... 5
    01.04.2003 ... - ... 2 ... -4

    i know i was quite unclear, so please let me know if you dont understand what i mean.

    thanks for any help you can give me,

    best regards

    Finn

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Help with IF formula for dates

    use a pivot table
    see attached
    use another col d to get each difference into its own cell then

    select data including headers
    from insert tab
    select pivot table
    choose where you want it say existing worksheet f1
    click ok

    from the pivot table field list

    drag and drop date into row field
    drag and drop difference into data field
    close the
    pivot table field list
    right click the pivot table
    select pivot table options
    on totals and filters tab
    uncheck show grand totals for columns
    click ok
    the dropdown arrow in the date field
    can be used to filter the table on any date or dates
    Attached Files Attached Files
    Last edited by martindwilson; 02-16-2010 at 12:15 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    02-16-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Help with IF formula for dates

    thanks a lot! great help!

    Finn

+ 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