My VBA skills are nonexistent, and I have not been able to find any threads that fit my situation, hence this thread.
I have a column in an Excel sheet containing names (column B) and I'm trying to hyperlink the cells in B to web pages. There's one specific web page for each row.
It'd be easy to just use the HYPERLINK function if I have a column with all of the corresponding URLS but the problem is that the final version of the spreadsheet will not have a column with URLs.
What the final version will include: (column B) names hyperlinked to specific web pages, and (column A) IDs that includes a unique part of the URL plus the name from B
The URLs are all identical except for the number at the end. The part that doesn't change is:
http://www.regulations.gov/#!documentDetail;D=CFPB-2011-0008
and there's a four-digit number at the end for each URL.
The bit starting with "CFPB" and ending with the four-digit number is the part that's going to be included in column A.
So my plan is to write a VBA program that adds hyperlinks to B using URLs constructed from
http://www.regulations.gov/#!documentDetail;D=
and the front part of the corresponding cells in A (e.g. CFPB-2011-0008-0002). I'm thinking of using the LEFT function to get this second part of the URL from A (e.g. LEFT(A1,19)).
Sorry if the explanation is not clear... Any help will be much appreciated.
#
within the URL. support.microsoft.com/en-us/kb/202261 – Axel Richter#
in filenames. – Cominternhttp://www.regulations.gov/%20-%20!documentDetail;D=CFPB-2011-0008
which fails. – Axel Richter