writing text to different cell after comparing

  • Thread starter Thread starter tracktraining
  • Start date Start date
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
 
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
 
Back
Top