Feb 20 2024 03:00 AM
I want to be able to change the fill of a cell based on the text placed in another cell.
Example: If I type "BOILER" into a cell in column H (eg H41) then I want the corresponding cell in another column (eg A41) to change colour, but not change the text.
Thank you in advance for any assistance provided.
Feb 20 2024 03:06 AM
Here's how you can achieve conditional formatting based on the text in another cell in Excel:
Steps:
Select the target cell where you want the color change to occur: In your example, select cell A41 (or the corresponding cell for other rows).
Go to the "Conditional Formatting" menu:
Set up the formatting rule:
Enter the formula:
This formula checks if the value in cell H41 (or the specified cell) is equal to "BOILER" (replace "BOILER" with the desired text). If true, the formatting will be applied.
Set the formatting:
Explanation:
Additional Notes:
By following these steps, you can effectively change the fill color of a cell based on the text content in another cell, enhancing the visual clarity and organization of your spreadsheet.
Feb 20 2024 03:34 AM - edited Feb 20 2024 03:39 AM
Hi @smylbugti222gmailcom,
Thank you for your reply. I have managed to get this working, however it's not quite what I am after.
I have a list I am filling in. When I type a word (eg "BOILER" or "NIBE") into a cell on the H column, then I want the same number cell in another column to change colour.
Example 1: I type "BOILER" into H41, then both H41 A41 are highlighted green.
Example 2: I type "NIBE" into H41, then both H41 and A41 are highlighted pink.
I want to apply this rule to the entire column, so going forward, if I type "boiler" into say H234, then both H234 and A234 are highlighted green. If i type "NIBE" then they are highlighted pink, etc.
I thought that the following formula would work but it is not.
=$H:$H "BOILER"
Thank you.
Feb 20 2024 04:10 AM
Select column A, then hold down Ctrl while you select column H. H1 should be the active cell in the selection.
On the Home tab of the ribbon, click Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula
=$H1="BOILER"
The $ before the column letter H is essential.
Click Format...
Activate the Fill tab.
Select green as fill color.
Click OK, then click OK again.
Repeat these steps, but with
=$H1="NIBE"
and pink as color.
Repeat as needed for other values.
Feb 20 2024 05:27 AM
Feb 20 2024 05:43 AM
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?
Feb 20 2024 06:02 AM
So when I type a word (such as "BOILER") into an "I" cell, I would like that cell, and the corresponding cell in the A column to turn the appropriate colour.
NOTE: I do not want the entire row to turn that colour, just the specified cell(s) in that row.
Feb 20 2024 06:08 AM
In your original question, you mentioned column H.
Now it turns out to be column I instead of column H.
So obviously, you should use column I in the conditional formatting formulas:
=$I1="BOILER"
etc.
Feb 20 2024 06:11 AM
Feb 20 2024 06:17 AM - edited Feb 20 2024 06:17 AM
When you say "Formulas", are you saying that I need to do that for each individual cell in the A column? Because my question is regarding the idea of lots of entries going forward, hence why I want to apply the formula to the entire column with 1 conditional format if possible.
Feb 20 2024 06:23 AM - edited Feb 20 2024 06:24 AM
Hi @HansVogelaar
I have figured it out. I do need to apply it to each individual cell, however this is done by applying the formula to a single cell, then dragging it down to the rest. This doesn't do the entire column, but I am able to keep dragging it down as needed.
Thank you for your help, I hope you have a good day! 🙂
Feb 20 2024 07:28 AM
If you select columns A and I before creating the rules, as I suggested in my first reply, you don't have to fill or use the format painter. Excel will automatically adjust the rules for all cells in the selection.
Feb 20 2024 08:36 AM - edited Feb 20 2024 08:36 AM
Yeah I did try that method to no avail unfortunately.
Feb 21 2024 12:45 AM