Hide a Cell Value

D

DW

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
 
S

StumpedAgain

If you don't need to /hide/ hide it (from users) the following will work in A2.

=IF(B1="Joe","What do you know?","***")
 
F

FSt1

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 ....=b2>0....format cell background to black.

my thoughts
Regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top