+ Reply to Thread
Results 1 to 2 of 2

SUMIF Cells in range if values in another range is

  1. #1
    Forum Contributor
    Join Date
    03-09-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007
    Posts
    128

    SUMIF Cells in range if values in another range is

    Hi,

    I'm not sure whether the title explains the problem or not.

    But I have several dates in date format in column A

    eg.
    Column A:

    01.01.2009
    01.02.2009
    ..
    ..
    ..
    01.01.2010


    Column B:

    45
    26
    ..
    ..
    ..
    34


    I like to make a Formula that Sums up all the rows in column B that are within a certain year given in Column A.

    eg.

    If year is 2009, sum 45 + 26
    If year is 2010, sum 34

    Is there a way I can add formulas to do this in Excel, or will I need to tap into VBA?

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: SUMIF Cells in range if values in another range is

    Try

    =Sumproduct(--(Year(A1:A100)=2009),B1:B100)

    Where A1:B100 contain your raw data

    You can replace 2009 with a cell reference containing 2009...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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