Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I need to add the following to my present macro if possible.
In column Q, which often contains a sentence or two of text, sometimes nothing, I need to add the function to find the word "waived", if present, from among the words in each cell and place a "W" into column N on the same row and if not present, put nothing then continue the macro. (XL2000, column currently formatted as "General"). Phil |
#2
![]() |
|||
|
|||
![]()
Phil
one way, mostly from the VBA Help: Sub FindWaivedInQ() Dim c As Range Dim FirstAddress As String With Range("Q1:Q" & Range("Q" & Rows.Count).End(xlUp).Row) Set c = .Find("waived", LookIn:=xlValues) If Not c Is Nothing Then FirstAddress = c.Address Do c.Offset(0, -3).Value = "W" Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address < FirstAddress End If End With End Sub Regards Trevor "Phil #3" wrote in message et... I need to add the following to my present macro if possible. In column Q, which often contains a sentence or two of text, sometimes nothing, I need to add the function to find the word "waived", if present, from among the words in each cell and place a "W" into column N on the same row and if not present, put nothing then continue the macro. (XL2000, column currently formatted as "General"). Phil |
#3
![]() |
|||
|
|||
![]()
This is exactly what I was looking for. It works perfectly.
Thanks. You guys are genius' :) Phil "Trevor Shuttleworth" wrote in message ... Phil one way, mostly from the VBA Help: Sub FindWaivedInQ() Dim c As Range Dim FirstAddress As String With Range("Q1:Q" & Range("Q" & Rows.Count).End(xlUp).Row) Set c = .Find("waived", LookIn:=xlValues) If Not c Is Nothing Then FirstAddress = c.Address Do c.Offset(0, -3).Value = "W" Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address < FirstAddress End If End With End Sub Regards Trevor "Phil #3" wrote in message et... I need to add the following to my present macro if possible. In column Q, which often contains a sentence or two of text, sometimes nothing, I need to add the function to find the word "waived", if present, from among the words in each cell and place a "W" into column N on the same row and if not present, put nothing then continue the macro. (XL2000, column currently formatted as "General"). Phil |
#4
![]() |
|||
|
|||
![]()
You're welcome. Thanks for the feedback.
"Phil #3" wrote in message ink.net... This is exactly what I was looking for. It works perfectly. Thanks. You guys are genius' :) Phil "Trevor Shuttleworth" wrote in message ... Phil one way, mostly from the VBA Help: Sub FindWaivedInQ() Dim c As Range Dim FirstAddress As String With Range("Q1:Q" & Range("Q" & Rows.Count).End(xlUp).Row) Set c = .Find("waived", LookIn:=xlValues) If Not c Is Nothing Then FirstAddress = c.Address Do c.Offset(0, -3).Value = "W" Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address < FirstAddress End If End With End Sub Regards Trevor "Phil #3" wrote in message et... I need to add the following to my present macro if possible. In column Q, which often contains a sentence or two of text, sometimes nothing, I need to add the function to find the word "waived", if present, from among the words in each cell and place a "W" into column N on the same row and if not present, put nothing then continue the macro. (XL2000, column currently formatted as "General"). Phil |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding Words In Excel Spreadsheets & Word Documents | Excel Discussion (Misc queries) | |||
Is This POSSIBLE | New Users to Excel | |||
Counting unique entries in column A but only if specific values appear in columns B and C | Excel Worksheet Functions | |||
Finding and Deleting duplicates in a column | Excel Worksheet Functions | |||
Getting specific data from a word document into an excel sheet | Excel Worksheet Functions |