Using Sumproduct

amcather

New Member
Joined
Nov 8, 2005
Messages
4
I am currently using the SUMPRODUCT to sum a value if it is in two date ranges. I want to sum a group of numbers when they don't = "N/A". We can use a previous column where N/A maps to 0. I have been using the following formulas but I get a #Value. When i have broken it out to

R= column with N/A, Q = column with 0
=SUMPRODUCT(--('7.1 - IPPS Review'!$R$2:$R$10002),--('7.1 - IPPS Review'!$B$2:$B$10002>=Start_Date),--('7.1 - IPPS Review'!$B$2:$B$10002<=End_Date),--('7.1 - IPPS Review'!Q2:Q10002<>"0"))

=SUMPRODUCT(--('7.1 - IPPS Review'!$R$2:$R$10002<>"N/A"),--('7.1 - IPPS Review'!$B$2:$B$10002>=Start_Date),--('7.1 - IPPS Review'!$B$2:$B$10002<=End_Date),
)

Thanks for your help in Advance
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Try:

=SUMPRODUCT(--(NOT(ISNA('7.1 - IPPS Review'!$R$2:$R$10002))),--('7.1 - IPPS Review'!$B$2:$B$10002>=Start_Date),--('7.1 - IPPS Review'!$B$2:$B$10002<=End_Date),--('7.1 - IPPS Review'!Q2:Q10002<>"0"))
 
Upvote 0
how to sum w/ N/A in array

Thanks for your reply. That works except it tries to sum the "n/a" how can i use that formula but but criteria not to sum "n/a". For example,

The values in colunmn Q are N/A, N/A, 0, 1, 2, 5, 7 - the sum should be 15 however i get #value. Is this feasible?
 
Upvote 0
If Q2 on sheet "7.1 - IPPS Review" contains the formula:

=IF(ISNA(R2),0,R2)

copied down, you could use:

=SUMPRODUCT(--('7.1 - IPPS Review'!$B$2:$B$10002>=Start_Date),--('7.1 - IPPS Review'!$B$2:$B$10002<=End_Date),('7.1 - IPPS Review'!Q2:Q10002))

to sum the the values in column R that are not #N/A.
 
Upvote 0

Forum statistics

Threads
1,214,787
Messages
6,121,558
Members
449,038
Latest member
Guest1337

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