+ Reply to Thread
Results 1 to 2 of 2

Compile Error Highlights beginning of url text in Formula

  1. #1
    Registered User
    Join Date
    04-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    8

    Compile Error Highlights beginning of url text in Formula

    First of all let me say the moderator bot or whatever would not allow me to post this question because it contained a link. I had to get creative and replace 5 certain letters with haich tee tee pee ess in the "code" below

    I am trying to create a formula that is copyable through a range of cells that will create a hyperlink to a webpage of action items in each cell of column A. The url of each hyperlink is common until the last 5 characters, which is the action item number. The action item number itself is contained in column L, so I wanted to concatenate the partial url and L information together.

    After typing in the info, vba brings up the Compile Error: Expected End of Statement while highlighting the "haich tee tee pee ess" text in the formula. I tried the formula on its own in a single cell in the worksheet and it works fine.
    Example is below, but url info has been changed due to proprietary info.

    Please Login or Register  to view this content.
    The expected result after macro is run: if L1 contains the number 34262, A1 contains a hyperlink to action item 34262 on the website, same for each A cell and its corresponding L cell.

    Any insight appreciated

  2. #2
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    20,832

    Re: Compile Error Highlights beginning of url text in Formula

    When you have a quoted string (your entire formula is a quoted string) which contains quote marks inside it, you must use double quote marks, otherwise it thinks you are ending the string and hilarity ensues.

    Please Login or Register  to view this content.
    We do not allow links until you get several posts under your belt because we get so much spam with links in it.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Compile Error: compile error constant expression required.
    By countryfan_nt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2019, 04:45 AM
  2. [SOLVED] highlights cell based on text -- error -13
    By karurkumar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2017, 08:05 AM
  3. Formula to move text to beginning of cell
    By yankeekid86 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-27-2016, 10:08 AM
  4. VBA Help! Compile Error - Expected End with - Text to Date Change
    By mmaya in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2016, 04:10 PM
  5. [SOLVED] formula to place text, beginning from 4th slash from right
    By Marcin4111 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-01-2014, 04:49 AM
  6. [SOLVED] Compile Error in Hidden Module and Compile Error: Can't find project or library
    By Taislin in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-10-2013, 07:03 PM
  7. compile error - Using text box to display date in an user form
    By sivdin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2013, 04:02 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1