![]() |
Hide a Cell Value
Hey All,
I have a worksheet where I need to hide the contents of a cell (we'll say A2)....such as making it all asterisks (*) just like a password field. But, when another cell's (we'll say B1) value changes, A2 needs to reveal it's true data.....and then when B1 is blank again, A2 needs to revert to asterisks. Example, A1 B1 A1 B1 hello hello Joe A2 B2 A2 B2 *** What do you know? Anyway to do this? Thanks for any assistance. Don |
Hide a Cell Value
If you don't need to /hide/ hide it (from users) the following will work in A2.
=IF(B1="Joe","What do you know?","***") -- -SA "DW" wrote: Hey All, I have a worksheet where I need to hide the contents of a cell (we'll say A2)....such as making it all asterisks (*) just like a password field. But, when another cell's (we'll say B1) value changes, A2 needs to reveal it's true data.....and then when B1 is blank again, A2 needs to revert to asterisks. Example, A1 B1 A1 B1 hello hello Joe A2 B2 A2 B2 *** What do you know? Anyway to do this? Thanks for any assistance. Don |
Hide a Cell Value
hi
not too sure you can do it with astericks but you might be able to change the font to a font that uses symbles instead of letters. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Set Target = Range("B1") If Target = "" Then Range("A2").Font.Name = "marlett" Else Range("A2").Font.Name = "arial" 'or your favorite End If End Sub there are other fonts like wingdings that you could use. another way might be to use conditional formating to black out the cell. in a2 enter conditonal fomating like formula is ....=b20....format cell background to black. my thoughts Regards FSt1 "DW" wrote: Hey All, I have a worksheet where I need to hide the contents of a cell (we'll say A2)....such as making it all asterisks (*) just like a password field. But, when another cell's (we'll say B1) value changes, A2 needs to reveal it's true data.....and then when B1 is blank again, A2 needs to revert to asterisks. Example, A1 B1 A1 B1 hello hello Joe A2 B2 A2 B2 *** What do you know? Anyway to do this? Thanks for any assistance. Don |
Hide a Cell Value
Thanks FSt1.....This did the trick.............
Don "FSt1" wrote in message ... hi not too sure you can do it with astericks but you might be able to change the font to a font that uses symbles instead of letters. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Set Target = Range("B1") If Target = "" Then Range("A2").Font.Name = "marlett" Else Range("A2").Font.Name = "arial" 'or your favorite End If End Sub there are other fonts like wingdings that you could use. another way might be to use conditional formating to black out the cell. in a2 enter conditonal fomating like formula is ....=b20....format cell background to black. my thoughts Regards FSt1 "DW" wrote: Hey All, I have a worksheet where I need to hide the contents of a cell (we'll say A2)....such as making it all asterisks (*) just like a password field. But, when another cell's (we'll say B1) value changes, A2 needs to reveal it's true data.....and then when B1 is blank again, A2 needs to revert to asterisks. Example, A1 B1 A1 B1 hello hello Joe A2 B2 A2 B2 *** What do you know? Anyway to do this? Thanks for any assistance. Don |
All times are GMT +1. The time now is 10:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com