+ Reply to Thread
Results 1 to 6 of 6

How to create a formula to combine IF and HYPERLINK in Excel

  1. #1
    Registered User
    Join Date
    04-16-2021
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    91

    How to create a formula to combine IF and HYPERLINK in Excel

    I have a spreadsheet generated from MS Forms and there are a lot of columns, to make it easier to use for my team I want to add in some hyperlinks where depending on the text in a column it will take them to another column in the document. As I understand this would need to combine the IF and Hyperlink formulas but I can't get it to work. Here's an example spreadsheet (attached).

    Would really appreciate any thoughts.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,792

    Re: How to create a formula to combine IF and HYPERLINK in Excel

    So, if you clicked on Red (in A3) would you want the cursor to jump to C3 (i.e. on the same row), or to C2 ?

    Do you already have those colours in column A, and does that mean that you want the HYPERLINK formula in a separate column?

    Pete

  3. #3
    Registered User
    Join Date
    04-16-2021
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    91

    Re: How to create a formula to combine IF and HYPERLINK in Excel

    Quote Originally Posted by Pete_UK View Post
    So, if you clicked on Red (in A3) would you want the cursor to jump to C3 (i.e. on the same row), or to C2 ?

    Do you already have those colours in column A, and does that mean that you want the HYPERLINK formula in a separate column?

    Pete
    Hi Pete, thanks for the quick reply. Yes that's exactly what I want.

    I want the formula to set specific conditions depending on what colour has been selected in column A and then depending on what is put to jump to the relevant colour column. The hyperlink can be added to another column, that's no problem. So could add a column to the right with the relevant hyperlink.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,792

    Re: How to create a formula to combine IF and HYPERLINK in Excel

    In the sample file that you submitted, insert a new column B, then copy A1 into B1. Put this formula in B2:

    =IF(A2="","",HYPERLINK("#Sheet1!R"&ROW()&"C"&MATCH(A2,$A$1:$F$1,0),A2))

    and copy this down as far as you like. You can then hide column A.

    Then just click on any colour in column B and the cursor will move across on the same row to the appropriate column, based on the headings in C1:F1.

    Note that the formula uses R1C1 notation for the cell reference, so it might look a bit different to what you are used to.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    04-16-2021
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    91

    Re: How to create a formula to combine IF and HYPERLINK in Excel

    Quote Originally Posted by Pete_UK View Post
    In the sample file that you submitted, insert a new column B, then copy A1 into B1. Put this formula in B2:

    =IF(A2="","",HYPERLINK("#Sheet1!R"&ROW()&"C"&MATCH(A2,$A$1:$F$1,0),A2))

    and copy this down as far as you like. You can then hide column A.

    Then just click on any colour in column B and the cursor will move across on the same row to the appropriate column, based on the headings in C1:F1.

    Note that the formula uses R1C1 notation for the cell reference, so it might look a bit different to what you are used to.

    Hope this helps.

    Pete
    Thanks Pete. That worked perfectly on the test sheet, however on the sheet I'm going to be using it's a response sheet for MS Forms and will be automatically populating. Is there anyway to use this formula without having to copy over the text manually - for it to reference A2 rather than B2 when applying the formula?

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,792

    Re: How to create a formula to combine IF and HYPERLINK in Excel

    I've never used MS Forms, so I can't advise on how to interface with that. The formula (in B2) does reference A2, so I'm not sure what you mean by that comment. You can't have both a formula and a value in the same cell.

    Pete

+ 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. [SOLVED] Create a Hyperlink from an Array Formula
    By ilovepaper in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2020, 08:22 AM
  2. [SOLVED] What is the hyperlink formula to create a hyperlink in Excel to a bookmark in Word
    By BryanHCR in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-23-2019, 11:41 PM
  3. [SOLVED] Create a hyperlink formula using populated cells
    By chriswrcg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2018, 08:02 PM
  4. Need formula to create hyperlink path to images
    By CampusLibrarian in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-12-2015, 03:30 PM
  5. [SOLVED] Excel 2010 Create a macro to check if cell contains hyperlink then apply hyperlink style
    By chasidar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2013, 04:48 AM
  6. Replies: 10
    Last Post: 02-11-2013, 02:55 AM
  7. How i can create a formula that combine subtotals and sumif
    By Ray in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-15-2006, 11:20 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