Passing dates as criteria in queries

TraceyB

New Member
Joined
Jul 8, 2008
Messages
2
I am trying to use Excel to create criteria for a query
one of my criteria is a date;
I have at present the following formulae in the cell:
="[Response History.ResponseDate] = "&C1&C6&C1
Where cell C1 contains quote marks "
and Cell C6 contains a date "10/12/2007" (picked by user from a picklist)

the formulae returns the following value:
[Response History.ResponseDate] = "39426"

when what I really need it to return is:
[Response History.ResponseDate] = "10/12/2007"
so that I can use it with my software addin to pull back required data from the datasource.

can anyone assist with me getting the value i need please
I am happy to build any functions into VBA code if it is not possible in just excel formulae.

Thanks in advance :)
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
removed original post -- not VBA.

You could try

=CHAR(34)&TEXT(C6,"DD/MM/YYYY")&CHAR(34)
 
Last edited:
Upvote 0
Thank you, this is just what I was looking for
I have spent hours on this today and have tried everything except this!!!
thanks again
Tracey
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,196
Members
449,072
Latest member
DW Draft

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