Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Each cell in Range("B2:B5000") contains an alphanumeric word. I need a *macro* that will loop through every cell in the range. If any word in any cell in the range contains the substring or subtext "LL7P" then that cell is to be colored red. Any help would be greatly appreciated. Thanks. Jay Dean *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For Each cell In Range("B2:B5000")
If cell,Value Like ("*LL7P*") Then cell.Interior.Colorindex = 3 End If Next cell -- HTH RP (remove nothere from the email address if mailing direct) "jay dean" wrote in message ... Each cell in Range("B2:B5000") contains an alphanumeric word. I need a *macro* that will loop through every cell in the range. If any word in any cell in the range contains the substring or subtext "LL7P" then that cell is to be colored red. Any help would be greatly appreciated. Thanks. Jay Dean *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Bob - This works excellently, and thanks a lot ! I have a follow-up question and a general one. 1. In the line "If cell.Value Like ("*LL7P*").." what is "Like"? Is it a property of the cell object?.. and how do I use the VBA help or other resources to learn these things? 2.When/How is the ampersand "&" used in cell formulas, or concatenating text in VBA? Thanks for all that you do! Jay Dean *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jay,
No, Like is an operator. Essentially, it allows a wildcard test by saying *LLP7*. Take a look at 'Like Operator' in VBA Help. UN fortunately, VBA Help is like any other Help, it assumes you know what you are looking for, it is of no help if you don't know how to express you question. I don't understand the second question. Your question seems to articulate it perfectly, & is used to concatenate strings. -- HTH RP (remove nothere from the email address if mailing direct) "jay dean" wrote in message ... Bob - This works excellently, and thanks a lot ! I have a follow-up question and a general one. 1. In the line "If cell.Value Like ("*LL7P*").." what is "Like"? Is it a property of the cell object?.. and how do I use the VBA help or other resources to learn these things? 2.When/How is the ampersand "&" used in cell formulas, or concatenating text in VBA? Thanks for all that you do! Jay Dean *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
substring | Excel Discussion (Misc queries) | |||
Substring | Excel Discussion (Misc queries) | |||
Substring | Excel Discussion (Misc queries) | |||
Can excel macro access SUBstring individual 'char' level? If so how? | Excel Discussion (Misc queries) | |||
subtext in Excel | Excel Discussion (Misc queries) |