Ignore #N/A in DSum formula

davedec

New Member
Joined
Jul 15, 2013
Messages
11
Hi,

This is my first post so hopefully it is done correctly.

Is there a way of excluding #N/A figures using DSum.

There is data in columns (date sorted) which are formula driven and uses NA() instead of zero so that only numbers > 0 are charted.

The book also has MTD figures using criteria to show MTD and YTD analysis, Dsum is used for these but I have not been able to find a solution for excluding #N/A from this formula

Current formula used is "=DSUM($H$1:$O$1000,A4,$E$2:$F$3)"

Any solutions to this?

Regards

David
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi William,

Thanks for the reply. What I was looking for is DSum to ignore the #N/A in the relevant column in the dataset.

Cheers

Dave
 
Upvote 0
Hi,

This is my first post so hopefully it is done correctly.

Is there a way of excluding #N/A figures using DSum.

There is data in columns (date sorted) which are formula driven and uses NA() instead of zero so that only numbers > 0 are charted.

The book also has MTD figures using criteria to show MTD and YTD analysis, Dsum is used for these but I have not been able to find a solution for excluding #N/A from this formula

Current formula used is "=DSUM($H$1:$O$1000,A4,$E$2:$F$3)"

Any solutions to this?

Regards

David

Which column are you summing?
 
Upvote 0
Try adding does not equal #N/A in your criteria field.

See example below.
Excel Workbook
ABCDEF
1DataSumDataSumSum
2Apples1Apples>3#N/A
3pear3
4Apples#N/ASum ofApples >3
5Apples616
6orange4
7pear5
8Apples10
Sheet
 
Upvote 0
Hi Aladin,

I am summing Column J.

Cheers

Dave

Extend the criteria range with G2:G3 where

G2 is left empty

G3 has the following formula either:

=OR(J2<0,J2>0)

Or:

=J2 < 9.99999999999999E+307

The DSUM formula now becomes:

=DSUM($H$1:$O$1000,A4,$E$2:$G$3)
 
Upvote 0
Cheers DeezNuts / Aladin / AhoyNC - appreciate your responses.

I found using the "=sumifs" formula with both date criteria and ">0" (criteria also) to exclude the #N/A but still sum the numbers in the column worked really well.

Many ways to skin a cat hey

Best

Dave
 
Upvote 0
Cheers DeezNuts / Aladin / AhoyNC - appreciate your responses.

I found using the "=sumifs" formula with both date criteria and ">0" (criteria also) to exclude the #N/A but still sum the numbers in the column worked really well.

Many ways to skin a cat hey

Best

Dave

So, you gave up on DSUM in favor of SUMIFS? As shown to you, DSUM can be made to avoid #N/A's.

With SUMIFS...

Either...

=SUM(SUMIFS(SumRange,SumRange,{"<0",">0"},...))

Or...

=SUMIFS(SumRange,SumRange,"<"&9.99E+307,...)
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,434
Members
448,961
Latest member
nzskater

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