Dynamic Conditional Formatting based on List Box?

BigRods

Board Regular
Joined
Dec 16, 2011
Messages
68
Hi,

I wondered if there was a way to set conditional formatting on a sheet where the worksheet the formula references changes based upon what the user selects in a list box?

i.e. I want a cell on my front sheet to colour green or red based upon a vlookup result - if the user selects an entry from the list box, I'd like the vlookup formula to reference the worksheet selected in the list box.

I could do it via VBA, but wondered if there was a non-coding way to do it?

Thanks!
 
Last edited:

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hey

If I've understood right, you can select the cell then under the home tab, select conditional formatting, select new rule, select format only cells that contain and then adjust the rule description to meet the 1st result (i.e. "Specific Test" and "Containing" and "Yes"). Then select format and adjust the conditioning to whatever you want. Then, repeat these steps for your 2nd condition.

Hope it helps but forgive me if I've misunderstood your question.
 
Upvote 0
you probably want to investigate INDIRECT

So you might have a formula that says
=Sheet1!A1

You could replace this with
=INDIRECT([sheet name] &"!A1")
where [sheet name] is the piece of text selected using your drop down and must exactly match any sheet name

You'll need to consider all other syntax, so if your formula needs apostrophe (where sheet name includes a space) you'll need to include it, I omit from above as it's difficult to read it amongst the quotes below:
=INDIRECT("'" & [sheet name] &"'!A1")
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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