![]() |
How to test a cell for the strikethrough effect?
What formula, if any, would return, say, "true" or "false", for the presence
of the strikethrough effect on text in a given cell? |
How to test a cell for the strikethrough effect?
No formula can return formats.
Try this macro. Make sure you have an empty column to the right of the selected cells. Sub Strike_Through() For Each cell In Selection If cell.Font.Strikethrough = True Then cell.Offset(0, 1).Value = "TRUE" Else: cell.Offset(0, 1).Value = "FALSE" End If Next cell End Sub Gord Dibben MS Excel MVP On Wed, 27 Sep 2006 14:28:01 -0700, Ricter wrote: What formula, if any, would return, say, "true" or "false", for the presence of the strikethrough effect on text in a given cell? |
How to test a cell for the strikethrough effect?
No formula can return formats.
It can be done with a named formula that uses GET.CELL but a UDF or macro is easier to work with. Biff "Gord Dibben" <gorddibbATshawDOTca wrote in message ... No formula can return formats. Try this macro. Make sure you have an empty column to the right of the selected cells. Sub Strike_Through() For Each cell In Selection If cell.Font.Strikethrough = True Then cell.Offset(0, 1).Value = "TRUE" Else: cell.Offset(0, 1).Value = "FALSE" End If Next cell End Sub Gord Dibben MS Excel MVP On Wed, 27 Sep 2006 14:28:01 -0700, Ricter wrote: What formula, if any, would return, say, "true" or "false", for the presence of the strikethrough effect on text in a given cell? |
All times are GMT +1. The time now is 04:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com