updating a part/the date of the URL in excel

Copper Contributor

Basically, I haven't done much of excel formulation so this is new to me. I have an excel file which has a few hundreds of URL in it. now, most of these URL's are a search from different websites which include the dates in them. for example:

 

https://www.ft.com/search?q=investment&dateTo=2018-11-21&dateFrom=2018-11-21&sort=date

 

so the q=investment is what I'm searching which is static but the part To=2018-11-21&dateFrom=2018-11-21 depends on the date of everytime I open the file. I wonder if there is a way to formulate this URL so everytime I open the file, the dateTo=2018-11-21, and dateFrom=2018-11-21 gets updated by itself to today's date?

1 Reply
You could use the HYPERLINK function for this where you build the URL in column A and have the HYPERLINK function in column B. In A2:
="https://www.ft.com/search?q=investment&dateTo="&TEXT(TODAY(),"yyyy-mm-dd)&"&dateFrom="&TEXT(TODAY(),..."

In B2: =HYPERLINK(A2)