COUNTIFS on dates returned from MYSQL Query

NickGB

New Member
Joined
Jan 2, 2013
Messages
25
I'm struggling to get COUNTIFS to work when the dates I am tying to count are returned from a MYSQL table.

The formula I have used is:

=COUNTIFS(Smart!$Q$2:$Q$316,">"&(D12),Smart!$Q$2:$Q$316,"<"&(E12))

The actual dates are within the MYSQL table

=Table_Query_from_Primus[[#Headers],[Report_Forecast_Pre_nomina_Pre_nomina_date86]]

If I do a simple =Smart!$Q$2 if returns the date fine however as soon as I try and work in the COUNTIFS function it does not count.

I'm sure this is me not thinking this through properly but any help would be greatfull as I'm trying to create a dashboard.
 
Yeah they were coming in correctly ddmmyyyy. Really odd. Was looking everywhere for a resolution and even mrexcel consulting fee based support (although Mr E didn't reply... ).

it must be something to do with how msquery returns the dates/data I guess.
Cheers nick
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,223,332
Messages
6,171,508
Members
452,407
Latest member
Broken Calculator

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