ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   writing text to different cell after comparing (https://www.excelbanter.com/excel-worksheet-functions/219973-writing-text-different-cell-after-comparing.html)

tracktraining

writing text to different cell after comparing
 
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


--
Learning

Don Guillett

writing text to different cell after comparing
 
How about a double click. Right click sheet tabview codecopy/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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"tracktraining" wrote in message
...
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


--
Learning



Max

writing text to different cell after comparing
 
One way
In A2: =IF(COUNTIF(A1,"*"&"post"&"*"),"post","")
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,000 Files:370 Subscribers:66
xdemechanik
---
"tracktraining" wrote:
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).




All times are GMT +1. The time now is 02:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com