help with sumif visible cells only

jordanburch

Active Member
Joined
Jun 10, 2016
Messages
440
Office Version
  1. 2016
=SUMPRODUCT(($AR:$AR=AR838)+0,SUBTOTAL(109,OFFSET($J:$J,ROW($J:$J)-MIN(ROW($J:$J)),0,1,1)))

hey guys for whatever reason this is returning at na value. can you help figure out whats wrong?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
It's really not a good idea to use entire columns in a formula like that. As to your error, I suspect you have an error value in one of the referenced cells.
 
Upvote 0
It's really not a good idea to use entire columns in a formula like that. As to your error, I suspect you have an error value in one of the referenced cells.
so i tried this
=SUMPRODUCT(($AR2:$AR3000=AR838)+0,SUBTOTAL(109,OFFSET($J2:$J3000,ROW($J2:$J3000)-MIN(ROW($J2:$J3000)),0,1,1)))

and it still didnt work. Theres no NA in the data. Theres an na in column ar but not in ar838. AR 838 is a formula if that matters?
 
Upvote 0
If the N/A is within
$AR2:$AR3000 then it will stop your formula from working. Assuming it's as a result of a formula, is there a reason you can't error handle it?
 
Upvote 0
If the N/A is within
$AR2:$AR3000 then it will stop your formula from working. Assuming it's as a result of a formula, is there a reason you can't error handle it?
even though its not looking for that value?

Im not sure how to error handle. The message says

a value is not available to the formula or function.
 
Upvote 0
If the N/A is within
$AR2:$AR3000 then it will stop your formula from working. Assuming it's as a result of a formula, is there a reason you can't error handle it?
ok so changing those nas to 0 worked. Thanks for your help! now i have to figure out why the zeros.

Jordan
 
Upvote 0
If the N/A is within
$AR2:$AR3000 then it will stop your formula from working. Assuming it's as a result of a formula, is there a reason you can't error handle it?
Hi Rory,

Is there any way to account for NA's in the formula? I am having the same issue when I run the code and dont really want to make all of the NA's to 0's. any thoughts?
 
Upvote 0
They don't have to be 0, they could be anything other than an error - eg "" or even "Error" since that would just be text.
 
Upvote 0
They don't have to be 0, they could be anything other than an error - eg "" or even "Error" since that would just be text.
but once i redo next months recons there will be an NA for sure so the code will error out again, is there a way to account for the na in the formula? Or should I just filter for na and change it to something else?
 
Upvote 0
Are the NA errors not formulas?
 
Upvote 0

Forum statistics

Threads
1,215,356
Messages
6,124,475
Members
449,164
Latest member
Monchichi

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