strikethrough

  • Thread starter Thread starter Mark Kurten
  • Start date Start date
M

Mark Kurten

if row 1 column 1 has a value that has a strikethrough applied, is there a
way in row 1 column 2 to write a conditional statement to check if 1,1 has a
strike through..something like if strikethrough exists put a y here, if not
put a n

thanks.
 
You could use this User Defined Function:

Function HasStrikethrough(a As Range) As String
If a.Font.Strikethrough Then HasStrikethrough = "Y" Else HasStrikethrough =
"N"
End Function

Enter the VB Editor (ALT+F11), Insert>Module, paste the above code.
Now you can use the function as if it were a buillt-in Excel function.

Of course the function would be more general if you did not assign "Y" or
"N", but TRUE or FALSE; that way you could assign whatever you liked to the
reslut of the function.
 
Back
Top