Home > Forum Home > Automating Data Analysis Tasks > Is this possible - Change dates in URL? | Share |
Forum Topic | Post Reply Login |
Is This Possible - Change Dates In Url? | Rate this: (3/5 from 1 vote) |
Hi all, thanks so much in advance! I'm researching hotel rates over the course of several days and am trying to sort out a way to essentially update a collection of links on specific hotels (via Orbitz, Kayak, etc) to reflect daily date changes. For example, here's a URL for a specific hotel on Kayak for a 1-night stay today: "http://www.kayak.com/hotels#BEST-WESTERN-PLUS-Grosvenor-Airport-Hotel,San-Francisco,CA-c13852-h33965/2011-10-17/2011-10-18/2guests" So tomorrow I want to come to this sheet, either update a master date field or otherwise increment those date values by 1. I could probably get away with some code that applies today's date straight away but the other 1/2 of this task is to have another batch (just in a 2nd Sheet?) of links pointing to tomorrow's date (hence why a single solution that can be applied to both Sheets might me best vs 2 different solutions). This may look like a simple Find/Replace function but I think it might be more complicated because I am also trying to manipulate URLs from 3 other travel sites that all embed the date in their URLs differently (ie, "10/17/2011...10/18/2011", "checkin_monthday=17&checkin_year_month=2011-10&checkout_monthday=18&checkout_year_month=2011-10", & "hotel.chkin=10%2F17%2F11&hotel.chkout=10%2F18%2F11") Add to it some numeric strings in these URLs that might coincidentally match the 2 digit date values and throw off a regular find/replace function. Is this at all possible?? I'm using Excel 2003 but will upgrade if necessary! Thanks again! | ||
Posted by DMKPDX on |
Replies - Displaying 1 to 6 of 6 | Order Replies By: Most Recent | Chronological | Highest Rated |
Rate this: (3/5 from 1 vote)
| |
Excel Business Forums Administrator | |
Posted by Excel Helper on |
Rate this: (3/5 from 1 vote) I think out of your 3 suggestions, option 3 might be the most applicable. Partly because I'm hoping such code could manipulate the dates among the various URL structures I'm dealing with. Here are the 5 URL types I'm working with - hopefully you know of a way to execute one function or macro that will run on a spreadsheet with hundreds of such URLs. [In these examples I'd want to take the dates of the 13th and 14th and increment them by a day. For my 2nd need of pulling info for "tomorrow" then perhaps this is a function I can just apply twice to a second Sheet of these links.]
Thank you so much. | |
Posted by DMKPDX on |
Rate this: (3/5 from 1 vote) | |
Excel Business Forums Administrator | |
Posted by Excel Helper on |
Rate this: (3/5 from 1 vote) | |
Posted by DMKPDX on |
Rate this: (3/5 from 1 vote) Before this I wondered whether there is not a more efficient and simply approach. If there were two cells with dates in them (and a list of destination cities), the combinations of URLs could be created by using DAY, MONTH and YEAR functions on the date cells and references to the city cells. This way, simply updating the date cells will update the URLs. Is this a viable solution? | |
Excel Business Forums Administrator | |
Posted by Excel Helper on |
Rate this: (3/5 from 1 vote) | |
Posted by DMKPDX on |
Displaying page 1 of 1 |
Find relevant Excel templates and add-ins for Is this possible - Change dates in URL? in the Excel Business Solutions Directory |