NEED A Code for my Excel sheet to calculate year total for each items in the list.

Samexcel

New member
Joined
Jul 30, 2012
Messages
3
Reaction score
0
Points
0
hi everyone,

i need a VBA code for my sheet. and in that sheet i need the sum of each items year qty, i have attached a example sheet to this request. in this sheet i have three items in the first columns and there value are given in date wise columns. i need a code to add the values of each item for each year. please have a look and suggest me a code.
 

Attachments

  • testfile.xlsx
    10.3 KB · Views: 30
It sounds pretty basic. However, I can't open your file because I'm stuck at office 2003.
If you could repost with a .xls file, I could help.
 
Hi Dave,

i am uploading the 2003 version of the file so that you can see.
 

Attachments

  • testfile_samexcel.xls
    30 KB · Views: 23
No need for VBA, a formula will do the job.

In cell B11 paste:

Code:
=SUMPRODUCT(--(YEAR($B$1:$H$1)=B$10),INDEX($B$2:$H$4,MATCH($A11,$A$2:$A$4,0),0))

Copy/autofill across & down.
 
Back
Top