You have to change the Condition 1 dropdown to Formula Is.
Then you use a form ula such as
=OR(ISNUMBER(FIND("LLC",A1)),ISNUMBER(FIND("Inc",A 1)),ISNUMBER(FIND("Corp",A
1)),ISNUMBER(FIND("Corporation",A1)))
Don't see where the last row comes into it, you apply this formula to all
selected cells.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Willie T" wrote in message
ups.com...
Newbie to VBA
I need to use Conditional Formatting to format a range of cells to have
Wheat background and Red text (Bold) if a text string is contained in
each cell. For example, all cells in a range that contain the text
string "LLC" or "Inc" or "Corp" or "Corporation" or
"Company" , etc.
If cell E2 contains Acme, LLC
I need to give that cell (E2) the condition formatting
If cell E3 contains John Brown
That cell does not get the condition formatting
If cell E4 contains Joe's Pool Hall, Inc
Cell E4 gets the condition formatting
Thanks to Dave Peterson I know how to dynamically find the last row or
all rows used in a spreadsheet as follows:
Sub MaxRow()
'Count the number of rows used in a worksheet
oRowMax = wks.UsedRange.Rows.Count
oRowMax1 = wks.UsedRange.Rows.Count + 1
End Sub
Thanks Dave...
I know how to manually use conditional formatting within a spreadsheet
but when using formulas in CF all I can find is when a cell is "equal
to" a value. Can someone tell me how to use "contains" in VBA CF
code or if it can be done? I would also like to incorporate the code
(MaxRow) from above if possible.
Thanks in advance for any help.
Willie T
|