Dsum syntax help again, this forum is always the best place to go

sheetspread

Well-known Member
Joined
Sep 19, 2005
Messages
5,156
DSum("[Today]","[My]","[SpecificAlloc] = """ & [SpecificAlloc] & """") works and gives me the amount in the TodayField field of the My query for the SpecificAlloc field value that matches the current query's record. What if I want to add an additional field, [SpecificAlloc2] and match it the same way (i.e. two conditions)? I tried variations of the above but the syntax is too tricky.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,358
Office Version
  1. 365
Platform
  1. Windows
Try this untested expression.

DSum("[Today]","My","[SpecificAlloc] = '" & [SpecificAlloc] & "' Or [SpecificAlloc] = '" & [SpecificAlloc2] & "'")

This is a valid expression but it might not be what you want, which isn't actually clear.:)
 
Upvote 0

sheetspread

Well-known Member
Joined
Sep 19, 2005
Messages
5,156
Yes, that works! Thanks Norie. Sorry about not being clear enough, despite a reasonable effort. Sometimes my tries are outside the lines.......
 
Upvote 0

Forum statistics

Threads
1,191,168
Messages
5,985,057
Members
439,936
Latest member
BSR

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
Top