Click on an empty cell and the contents of another cell will appear

M

Michael Lanier

Is it possible to click on an empty cell and by doing so, the contents
(in this case a symbol) in another cell will appear? I want this to
apply in a range of cells such as B10:B20. The symbol to appear is in
C1. Thanks for any help.

Michael
 
B

Bernie Deitrick

Michael,

Right-click the sheet tab, select 'View Code" and paste this code in the window that appears. See
in-line comments to choose which way to go....

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("B10:B20")) Is Nothing Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
If Target.Value <> "" Then Exit Sub
Application.EnableEvents = False
'If you only need the symbol (no formatting needed), use
Target.Value = Range("C1").Value
'If you need formatting (font) to show the symbol, then use
Range("C1").Copy Target
Application.CutCopyMode = False
Application.EnableEvents = True
End Sub
 

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