Apr 25 2021 09:41 AM
I am seeking to find a way to search a worksheet and find cells in a column which contain a single word or two amongst the many that may be in the cell and have that trigger a color reformat of an adjacent cell. It could be that I just don't know the proper operating terms. I have tried the texts "contains", "includes", and with just the words but I still cannot get it to do what I want. I believe this is possible either with a macro or in the Find function. Any suggestions or help would be appreciated. Thanks, John
Apr 25 2021 10:32 AM
You can use Conditional Formatting for this purposes.
Let's say you want to look at column D. If a cell contains the word Excel (with possibly other words), the adjacent cell in column E should be highlighted in green.
Select column E (the column you want to format).
On the Home tab of the ribbon, select Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula
=ISNUMBER(FIND("Excel",D1))
(We use D1 because it is the first cell in the selection)
Click Format...
Activate the Fill tab.
Select green.
Click OK, then click OK again.
If you want to highlight cells in column E if the cell in column D contains both Word and Excel, do the same, but with the formula
=AND(ISNUMBER(FIND("Word",D1)),ISNUMBER(FIND("Excel",D1)))
Apr 25 2021 10:35 AM
You may use conditional formatting rule with formula like
Of course better not to hardcode word withi the formula, above is only to illustrate an idea.
Apr 25 2021 03:09 PM
@Hans Vogelaar Thank you so much for responding however I am have difficulty in following your directions which may be because I am using a Mac. When I get to the Conditional Formatting screen it does not show me a place to enter your formula. I can see where it says formula under the minimum and maximum value. That did not work for me. This is a new subscription for me and I am transitioning from an old version. It is almost like starting over.
Thanks. John
Apr 26 2021 01:34 AM
This should work the same on Mac as on Windows.
Make sure that you select Conditional Formatting > New Rule..., and then 'Use a formula to determine which cells to format'.
Apr 26 2021 02:19 AM
@jhicks5charternet The screens on a Mac are a bit different.
1) New Rule... on the Home ribbon.
Then choose Classic in the Style field.
Then select "Use a formula .........." from the field below the Style.
Now you can enter your formula.
Apr 27 2021 06:24 AM
Apr 27 2021 07:05 AM - edited Apr 27 2021 07:18 AM
@jhicks5charternet Sorry, but my response was merely to point you into finding where to enter a classic CF formula on a Mac. You haven't given us anything to work with when it comes to your requirement. If the other responses that you received don't make sense, please upload a file (without confidential information) and explain what is is you want to format and with what logic.
Apr 27 2021 07:16 AM - edited Apr 27 2021 11:15 AM
Make sure that you select the entire column before creating the rule.
Apr 27 2021 09:48 AM
May 05 2021 06:11 AM
@Hans Vogelaar Is there a way to have this formula apply to more than one column without duplicating the formula and editing. I tried ending with ,D1:C1 but that did. not work all of the time. Thanks, John
May 05 2021 06:22 AM
Please explain in more detail what you want to accomplish.
May 05 2021 07:09 AM
May 05 2021 09:42 AM
May 05 2021 10:58 AM
The screenshot hasn't come through. Perhaps you could attach a sample workbook?
May 05 2021 11:18 AM
May 05 2021 11:27 AM
I'm sorry - this won't work. You have posted the path to the file on your local hard disk, but we cannot get at that of course.
Attach the workbook by dragging and dropping it into a reply.
May 05 2021 01:04 PM
May 05 2021 01:15 PM
If you wish, you can send the workbook to hans dot vogelaar at gmail dot com