ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   dsum evaluating only the beginning of a string? (https://www.excelbanter.com/excel-programming/400876-dsum-evaluating-only-beginning-string.html)

dan

dsum evaluating only the beginning of a string?
 
Hi,
I have notice something strange with the Dsum function
it is not comparing the full criteria but only the begining of it

for example:

name grade
a 1
b 2
c 3
d 4
abcd 5


criteria

name grade
a


dsum will give 6 (1 for "a "+ 5 for "abcd") and not the expect 1 for "a" only

is there a way around that?

Many thanks
Dan


Dave Peterson

dsum evaluating only the beginning of a string?
 
Try changing your criteria to a formula:
="=a"

or use a different formula:
=sumif(a:a,"A",b:b)



Dan wrote:

Hi,
I have notice something strange with the Dsum function
it is not comparing the full criteria but only the begining of it

for example:

name grade
a 1
b 2
c 3
d 4
abcd 5

criteria

name grade
a

dsum will give 6 (1 for "a "+ 5 for "abcd") and not the expect 1 for "a" only

is there a way around that?

Many thanks
Dan


--

Dave Peterson


All times are GMT +1. The time now is 05:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com