Hello,
I'm using a webquery to pull data down to a table in Excel. The query has two hard coded dates in it, but I want to replace them with values stored in cell on another tab in the same workbook. The idea is I can change the dates in the cells, then refresh the query to get new data from the new dates. Here is the webquery I'm using with the hard coded dates.
The parts I want to replace with references to cells are:
And...
I'd like the first one to reference cell A1 (which contains a date, such as 04/16/2023) and the second one to reference cell A2 (which contains a date, such as 04/30/2023).
I've tried to name the cells, and use this instead of the hard coded date:
...but I keep getting errors in the webquery. So, I then created three new cells for each date, using the following code:
I named each cell, such as WeekStartMM, WeekStartDD, WeekStartYY and PeriodEndMM, PeriodEndDD, PeriodEndYY. Then updated my webquery as follows:
Now I get an error that states Conversion failed when converting date and/or time from character string.
Any help would be much appreciated!
Thanks,
Mr Z.
Bookmarks