SUMPRODUCT

KII

New Member
Joined
Oct 27, 2002
Messages
33
OK.

I have a sheet which holds a hardware inventory. In the sheet is a colunm which has the ship date of each peace of hardware. There is also a colunm which denotes what type it is (eg Server,Desktop or Laptop).

I need to create a formula that goes through the rows and counts all server, Desktops and Laptops and tell me the following:

servers older than 3 years
desktops older than 5 years
laptops older than 3 years


Can this be done using SUMPRODUCT or COUNTIF????

Please Help.

Regards,

Kev@stmerryn.co.uk
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
hi!
if you just need to count all server,laptop, etc. then countif is applicable. but if you want to know the item that is more than N years from shipment then sumproduct is mostlikely the answer.
 
Upvote 0
Like this?
Book1
ABCDEFGHI
1ItemnoTypeShipdateTypeYearsoldCount
21server30-jan-03server33
32desktop02-jan-00desktop50
43laptop03-jan-00laptop34
54server04-jan-00
65desktop05-jan-00
76laptop06-jan-00
87server07-jan-00
98desktop08-jan-00
109laptop09-jan-00
1110server10-jan-00
1211desktop11-jan-00
1312laptop12-jan-00
Sheet2
 
Upvote 0
fairwinds said:
Like this?

=SUMPRODUCT(($B$2:$B$13=F2)*($C$2:$C$13<=DATE(YEAR(NOW())-G2,MONTH(NOW()),DAY(NOW()))))

Bit shorter:

=SUMPRODUCT(--($B$2:$B$13=F2),--(DATEDIF($C$2:$C$13,TODAY(),"Y")>G2))
 
Upvote 0

Forum statistics

Threads
1,214,804
Messages
6,121,652
Members
449,045
Latest member
Marcus05

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top