Formula referencing table name help

Outdoorsman80

Board Regular
Joined
Oct 4, 2014
Messages
62
Office Version
  1. 365
Platform
  1. Windows
I have multiple worksheets, worksheet G has a table with the name "tblExample". On worksheet A, I want to count the amount of rows that have data between a year.
Finances.xlsx
ABCDEFG
1ProductBrandDetailsDatePriceGoneD. Depleted
2Prod1Brand1612G.112019/12/01$ 2.75No
3Prod2Brand213354A2019/12/31$ 2.50No
4Prod3Brand2L67942020/12/31$ 2.50No4/2/2020
5Prod4Brand21717P2019/12/31$ 3.00No
6Prod5Brand1232/A2021/12/31$ 2.75No
7Prod6Brand14518P2019/12/31$ 2.75No
8Prod7Brand3L1046A2019/12/31$ 2.50Yes1/1/2021
worksheet G


Finances.xlsx
AB
13Products purchased in 20212
worksheet A
Cell Formulas
RangeFormula
B13B13=COUNTIFS(tblExample,">="&DATE(2021,1,1),tblExample,"<="&DATE(2021,12,31))

You can see that for products purchased in 2021, it shows two, but it should just be 1. It looks like it's picking up the date in the G column as well. How can I specify just the D column without D2:Dx?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You need to include the column name as well, like
Excel Formula:
=COUNTIFS(tblexample[Date],">="&DATE(2021,1,1),tblexample[Date],"<="&DATE(2021,12,31))
 
Upvote 0
Solution
I was experimenting with quotes; so when referencing a table name you use the brackets... Thank you!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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