A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi Larry
I'm AnnaThomas and I'd happily help you with your question. In this Forum, we are Microsoft consumers just like yourself.
To prevent this from happening, you can change the formatting of the new cell after inserting the row. Here’s how:
Select the cell that is incorrectly formatted as a hyperlink. Right-click on the cell and select Format Cells from the context menu. In the Format Cells dialog box, go to the Font tab. Under Font style, select Regular. Under Color, select Automatic. Click on OK.
This will remove the hyperlink formatting from the selected cell, while preserving the formatting of other cells in the column.
Alternatively, you can use a macro to automatically remove the hyperlink formatting from new cells when you insert a row. Here’s an example of a macro that does this:
Private Sub Worksheet_Change(ByVal Target As Range) ' Check if the change is an entire row being inserted If Target.Rows.Count = Me.Rows.Count Then ' Loop through each cell in the new row For Each cell In Target.Cells ' Check if the cell is formatted as a hyperlink If cell. Font.Underline = xlUnderlineStyleSingle And cell. Font.Color = RGB(5, 99, 193) Then ' Remove the hyperlink formatting cell. Font.Underline = xlUnderlineStyleNone cell. Font.Color = xlAutomatic End If Next cell End If End Sub
I hope this helps ;-), let me know if this is contrary to what you need, I would still be helpful to answer more of your questions.
Best Regards,
AnnaThomas
Give back to the community. Help the next person with this problem by indicating whether this answer solved your problem. Click Yes or No at the bottom.