Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Database Formula Criteria Problem

I am using a DSUM formula to total up accounting entries for numerous
accounts. I use a named range for the database (WTB01) and a named range for
the Criteria (UCRS01) and a formula for the SUM column (MONTH(NOW()) +28) as
follows =DSUM(WTB01,MONTH(NOW()+28,UCRS01)

The criteria range values (in UCRS01) a

ACCT
446
446A
446B
446X
446Z
450
450A
450B
450Z

The formula works fine for all accounts in the range but it is summing an
extra acct it shouldn't named 446BA

It seems to be extending the criteria to all values whose first digits match
instead of requiring all digits to match.

I hope this is clear and thanks for the help.

John Donnelly
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Database Formula Criteria Problem

I'm not familiar with db functions, and I'm not sure why it's happening the
way you described in your post.

Perhaps try this equivalent formula which uses your named ranges:
=SUMPRODUCT(--ISNUMBER(FIND(UCRS01,INDEX(WTB01,,1))),INDEX(WTB01 ,,MONTH(TODAY()+28)))

From my tests here, the above works ok. It won't pick up the extra account.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"johndonnelly" wrote:
I am using a DSUM formula to total up accounting entries for numerous
accounts. I use a named range for the database (WTB01) and a named range for
the Criteria (UCRS01) and a formula for the SUM column (MONTH(NOW()) +28) as
follows =DSUM(WTB01,MONTH(NOW()+28,UCRS01)

The criteria range values (in UCRS01) a

ACCT
446
446A
446B
446X
446Z
450
450A
450B
450Z

The formula works fine for all accounts in the range but it is summing an
extra acct it shouldn't named 446BA

It seems to be extending the criteria to all values whose first digits match
instead of requiring all digits to match.

I hope this is clear and thanks for the help.

John Donnelly

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Database Formula Criteria Problem

Hi Max,

Thanks. That formula works. In case you want to know I found another post
that answers it.

I like to use criteria ranges because when one of the accountants adds an
account I just add to the list. Anyway if in the criteria range you just put
a string the DSUM formula looks for the presence of that string in all cells
whether or not the cell contents includes other characters. To make the
selection specific the criteria must be preceded by an equal sign in the cell
such as =446B not just 446B. This way it will not select cells containing
characters other than the criteria such as 446BA.

Anyway thanks for your help Max, I appreciate it.
--
John Donnelly


"Max" wrote:

I'm not familiar with db functions, and I'm not sure why it's happening the
way you described in your post.

Perhaps try this equivalent formula which uses your named ranges:
=SUMPRODUCT(--ISNUMBER(FIND(UCRS01,INDEX(WTB01,,1))),INDEX(WTB01 ,,MONTH(TODAY()+28)))

From my tests here, the above works ok. It won't pick up the extra account.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"johndonnelly" wrote:
I am using a DSUM formula to total up accounting entries for numerous
accounts. I use a named range for the database (WTB01) and a named range for
the Criteria (UCRS01) and a formula for the SUM column (MONTH(NOW()) +28) as
follows =DSUM(WTB01,MONTH(NOW()+28,UCRS01)

The criteria range values (in UCRS01) a

ACCT
446
446A
446B
446X
446Z
450
450A
450B
450Z

The formula works fine for all accounts in the range but it is summing an
extra acct it shouldn't named 446BA

It seems to be extending the criteria to all values whose first digits match
instead of requiring all digits to match.

I hope this is clear and thanks for the help.

John Donnelly

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Database Formula Criteria Problem

welcome, and thanks for the explanation, John.
glad to hear you found what you were after.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"johndonnelly" wrote in message
...
Hi Max,

Thanks. That formula works. In case you want to know I found another post
that answers it.

I like to use criteria ranges because when one of the accountants adds an
account I just add to the list. Anyway if in the criteria range you just
put
a string the DSUM formula looks for the presence of that string in all
cells
whether or not the cell contents includes other characters. To make the
selection specific the criteria must be preceded by an equal sign in the
cell
such as =446B not just 446B. This way it will not select cells containing
characters other than the criteria such as 446BA.

Anyway thanks for your help Max, I appreciate it.
--
John Donnelly



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
=DMIN(database,field,criteria) question about criteria Dummy Excel Discussion (Misc queries) 2 April 16th 07 08:02 PM
Database function criteria Maistrye Excel Worksheet Functions 0 July 5th 06 09:57 PM
Database functions should use criteria in formula, as 1-2-3 does 123user Excel Worksheet Functions 8 September 29th 05 08:57 PM
database criteria aspencer27 Excel Discussion (Misc queries) 3 May 16th 05 03:24 PM
database criteria Dan in NY Excel Worksheet Functions 3 February 9th 05 07:29 PM


All times are GMT +1. The time now is 10:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"