+ Reply to Thread
Results 1 to 3 of 3

if condition calculate sum...

  1. #1
    Registered User
    Join Date
    05-06-2010
    Location
    Romania
    MS-Off Ver
    Excel 2010 beta
    Posts
    3

    if condition calculate sum...

    I'm trying to explain my problem as simply as possible (I'm not too good at explaining :P)

    I have A1:A6, each cell contains a date (1.5.2010 - 6.5.2010) and B1:B6 with numerical values.

    C5 contains the date 5.5.2010

    I want to find a way to compare C5 to A1:A6 and IF the value from C5 is found in A1:A6, calculate the sum of the corresponding cells in column B and paste the result in D5.

    basically, in the above example, D5 shoul be B1+B2+B3+B4+B5 because 5.5.2010 is found in A5.

    any ideas how this can be done in excel?

    I have excel 2010 beta and the dates are in dd.mm.yyyy format

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,720

    Re: if condition calculate sum...

    If the dates are real dates you can use SUMIF like this

    =SUMIF(A1:A6,"<="&C5,B1:B6)

  3. #3
    Registered User
    Join Date
    05-06-2010
    Location
    Romania
    MS-Off Ver
    Excel 2010 beta
    Posts
    3

    Re: if condition calculate sum...

    except for ";" instead of "," it works flawlessly! Thanks a million! tried to find a solution for hours and hours, and you solved it for me in minutes.

+ 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