View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default Adding values for selected years

Hi David

One way
=SUMPRODUCT(--(YEAR($E$7:$E$10070)=2006),$H$7:$H$10070)

--
Regards

Roger Govier


"OSDavidL" wrote
in message ...

I am trying to add values from one column (H) if the date year in
another (E) is 2006 or similar. I have tried the following with a 0 as
the result (which is wrong).

={SUM(IF($E$7:$E$10070=(YEAR($E$7:$E$10070)=2006), $H$7:$H$10070))}

Any ideas as to what is wrong? I suspect the
=(YEAR($E$7:$E$10070)=2006
section of the formula.


--
OSDavidL
------------------------------------------------------------------------
OSDavidL's Profile:
http://www.excelforum.com/member.php...o&userid=31305
View this thread:
http://www.excelforum.com/showthread...hreadid=509961