Adding static character to a cell

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

I want to insert a $ in column of cells. Use currency as the format, but I
want the $ to stay in the cell so it can be used also when printed out. I
hope that's clear?
Thanks
Frank
 
Frank,

The $ in a currency format should also get printed. It is a view of the
data, but consistent on screen and print.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
I know that, I didn't clarify my problem very well. .If this guy inserts an
amount, say $45., after he prints and clears the cell, the $ is gone of
course. Anyway to make it stay?
Thanks
Frank
 
Instead of clearing the contents of the cell, how about just typing a dollar
sign?
 
Following on Dave's idea

Private Sub Worksheet_Change(ByVal Target As Range)
Static prevValue

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Value = "" Then
Target.Value = "$"
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Back
Top