Conditional Format Based on Another Cells Text

dhally

Board Regular
Joined
May 9, 2011
Messages
58
Hello,
I have two cells, U635 and the adjacent cell V635. Both also are data validated drop down lists. If a particular name is chosen in U635, it will populate a unique drop down list available in V635 (multi-dependent validation).

What I would like to achieve through Conditional Formatting is:
If the name Multiple Machines (WC Admin.) is chosen in U635, I would like V635 to insert the text Multiple Machines. I have searched out a formula on several threads that works fine as a stand alone formula, but not functional via conditional formatting. Are there any possibilities?

Here is the formula:
=IF(COUNTIF(U635,"MULTIPLE MACHINES (W/C ADMIN.)")>0,"MULTIPLE MACHINES","")

Thank you in advance.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Conditional formatting can only change the format of a cell, not the contents.
 
Upvote 0
Thank you for your reply. I kind of figured that might be the case. But that's what I love about this message board...it never hurts to ask!

Have a good weekend.
 
Upvote 0
I'm assuming that if "Multiple Machines (WC Admin.)" is chosen in the U635 Data Validation cell then "Multiple Machines" is one of the choices (or maybe the only choice) for the depandant DV in U635. If this is the case you could have some vba code automatically populate U635 in this circumstance.

I suggest you test in a copy of your workbook.

To implement ..

1. Right click the sheet name tab and choose "View Code".

2. Copy and Paste the code below into the main right hand pane that opens at step 1.

3. Close the Visual Basic window.

4. Select "Multiple Machines (WC Admin.)" in U635.

<font face=Courier New><br><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Worksheet_Change(<SPAN style="color:#00007F">ByVal</SPAN> Target <SPAN style="color:#00007F">As</SPAN> Range)<br>    <SPAN style="color:#00007F">If</SPAN> <SPAN style="color:#00007F">Not</SPAN> Intersect(Target, Range("U635")) <SPAN style="color:#00007F">Is</SPAN> <SPAN style="color:#00007F">Nothing</SPAN> <SPAN style="color:#00007F">Then</SPAN><br>        <SPAN style="color:#00007F">If</SPAN> Range("U635").Value = "Multiple Machines (WC Admin.)" <SPAN style="color:#00007F">Then</SPAN><br>            Application.EnableEvents = <SPAN style="color:#00007F">False</SPAN><br>            Range("V635").Value = "Multiple Machines"<br>            Application.EnableEvents = <SPAN style="color:#00007F">True</SPAN><br>        <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br>    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,877
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top