Conditional format cells that contain links

robyrux

New Member
Joined
Oct 29, 2020
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi Team, I need to be able to highlight (preferably with conditional formatting) cells that contain hyperlinks. Is there a way to do this with a formula or function?

Thanks!
R
 

Some videos you may like

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

CsJHUN

Active Member
Joined
Jan 13, 2015
Messages
350
Office Version
  1. 2016
Platform
  1. Windows
Hi Robyrux
you can use this (B1) formula in your conditional format
Munkafüzet1
AB
1www.google.comIGAZ
Munka1
Cell Formulas
RangeFormula
B1B1=ISREF(A1)
 

CsJHUN

Active Member
Joined
Jan 13, 2015
Messages
350
Office Version
  1. 2016
Platform
  1. Windows
Oh, my bad,
morning is painfull :D
Put this into a modul, save the workbook with macro enabled

VBA Code:
Function ishyplink(target_cell As Range) As Integer
ishyplink = target_cell.Hyperlinks.Count
End Function

and you can use this as formula
asdasd.xlsm
AB
1www.google.com1
2something0
Munka1
Cell Formulas
RangeFormula
B1:B2B1=ishyplink(A1)
 

robyrux

New Member
Joined
Oct 29, 2020
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Oh, my bad,
morning is painfull :D
Put this into a modul, save the workbook with macro enabled

VBA Code:
Function ishyplink(target_cell As Range) As Integer
ishyplink = target_cell.Hyperlinks.Count
End Function

and you can use this as formula
asdasd.xlsm
AB
1www.google.com1
2something0
Munka1
Cell Formulas
RangeFormula
B1:B2B1=ishyplink(A1)
Great! It works!
Thanks so much :)
 

CsJHUN

Active Member
Joined
Jan 13, 2015
Messages
350
Office Version
  1. 2016
Platform
  1. Windows
Glad to help, can you mark your thread is solved? TY
 

Watch MrExcel Video

Forum statistics

Threads
1,118,567
Messages
5,572,958
Members
412,491
Latest member
tweetytoon
Top