referencing a DATABSE in DCOUNT

Swordfishtrombone

New Member
Joined
Jan 25, 2011
Messages
47
I am trying to find an easy way to "construct" a DCOUNT formula using cell references. I was able to use cell references for the Field element in a DCOUNT formula.
=DCOUNTA(DataSet1!$A$1:$A$100,D35,D35:D36)
By changing the values in cell (D35) I am able to change the DCOUNT formula and thereby the results.

But I am trying to figure out to use a similar cell reference to change the data set. I would like to be able to easily change
=DCOUNTA(DataSet1!$A$1:$A$100,D35,D35:D36)
to
=DCOUNTA(DataSet2!$A$1:$A$100,D35,D35:D36)

But I don't seem to be able to put "DataSet1" into a cell and reference that cell address in the formula, the same way I can with the Field or the Criteria variables. So if, for example, cell D1 had the text "DataSet1" in it, how can I incorporate that into the DCOUNT formula?

The overall purpose here is to be able to easily apply the same filters/criteria to different data.

Thanks in advance.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Forum statistics

Threads
1,224,578
Messages
6,179,650
Members
452,934
Latest member
mm1t1

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