![]() |
Hide Some Text in a Cell
Is there a way to hide certain text temporarily in a cell while displaying
the rest of the cell's contents? I know I could color that text white, but it repeats in many cells in the same column. I want to hide the same repetitive words in all of the adjoing cells, then uncover them later. DOUG ECKERT |
Hide Some Text in a Cell
1) It can be DELETED with a Macro [and "pasted" back later.
2) You can use =SUBSTITUTE(A1,"ABC","") in cell B1' in order to hide the ABC copying the formula down the range and, Temporarily, Hide column A. Afterwards, you can Hide Column B and uh-hide column A Micky "DOUG" wrote: Is there a way to hide certain text temporarily in a cell while displaying the rest of the cell's contents? I know I could color that text white, but it repeats in many cells in the same column. I want to hide the same repetitive words in all of the adjoing cells, then uncover them later. DOUG ECKERT |
Hide Some Text in a Cell
Sub Color_String()
Dim Rng As Range Dim Cell As Range Dim start_str As Integer Set Rng = Selection For Each Cell In Rng start_str = InStr(Cell.Value, "certain text") If start_str Then Cell.Characters(start_str, 5).Font.ColorIndex = 2 End If Next End Sub Gord Dibben MS Excel MVP On Fri, 8 Jan 2010 11:23:01 -0800, DOUG wrote: Is there a way to hide certain text temporarily in a cell while displaying the rest of the cell's contents? I know I could color that text white, but it repeats in many cells in the same column. I want to hide the same repetitive words in all of the adjoing cells, then uncover them later. DOUG ECKERT |
Hide Some Text in a Cell
If I'm not mistaken - instead of 5 it should read LEN("certain text")
Micky "Gord Dibben" wrote: Sub Color_String() Dim Rng As Range Dim Cell As Range Dim start_str As Integer Set Rng = Selection For Each Cell In Rng start_str = InStr(Cell.Value, "certain text") If start_str Then Cell.Characters(start_str, 5).Font.ColorIndex = 2 End If Next End Sub Gord Dibben MS Excel MVP On Fri, 8 Jan 2010 11:23:01 -0800, DOUG wrote: Is there a way to hide certain text temporarily in a cell while displaying the rest of the cell's contents? I know I could color that text white, but it repeats in many cells in the same column. I want to hide the same repetitive words in all of the adjoing cells, then uncover them later. DOUG ECKERT . |
Hide Some Text in a Cell
Thanks Micky
Changed part of old macro and forgot to change other parts to match. Could do better than hard coding the string. Sub Color_String() Dim Rng As Range Dim Cell As Range Dim start_str As Integer Dim mystr As String mystr = InputBox("Enter a text string") Set Rng = Selection For Each Cell In Rng start_str = InStr(Cell.Value, mystr) If start_str Then Cell.Characters(start_str, Len(mystr)).Font.ColorIndex = 2 End If Next End Sub Gord On Fri, 8 Jan 2010 12:47:01 -0800, ????? (????) ????? <micky-a*at*tapuz.co.il wrote: If I'm not mistaken - instead of 5 it should read LEN("certain text") Micky "Gord Dibben" wrote: Sub Color_String() Dim Rng As Range Dim Cell As Range Dim start_str As Integer Set Rng = Selection For Each Cell In Rng start_str = InStr(Cell.Value, "certain text") If start_str Then Cell.Characters(start_str, 5).Font.ColorIndex = 2 End If Next End Sub Gord Dibben MS Excel MVP On Fri, 8 Jan 2010 11:23:01 -0800, DOUG wrote: Is there a way to hide certain text temporarily in a cell while displaying the rest of the cell's contents? I know I could color that text white, but it repeats in many cells in the same column. I want to hide the same repetitive words in all of the adjoing cells, then uncover them later. DOUG ECKERT . |
All times are GMT +1. The time now is 11:02 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com