writing text to different cell after comparing

T

tracktraining

Hi All,

I have one cell (A1) that contains "post, rf on, e109, e10". I would like to
extract information from this cell. Meaning, when I click on A2, I want A2 to
search A1 cell for the word/text "post", and if the word "post" is in A1,
then write "post" in A2 otherwise leave blank (or turn it into a red color).

Is this possible? Thanks in advance.

thank you,
tracktraining
 
D

Don Guillett

How about a double click. Right click sheet tab>view code>copy/paste this

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
If Target.Address <> Range("a2").Address Then Exit Sub
If InStr(Range("a1"), "post") Then Target = "post"
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