Cant get this to work - Data validation conditional formatting by VBA :(

imcool

New Member
Joined
Nov 12, 2020
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
Hello,
I can not use conditional formatting because I am deleting rows based on user response and once the row/cell is deleted, conditional formatting disappears.

if user answer yes for question 1 then I add another question 2 with two option drop down data validation list.
If user answer Yes for question 2 from drop down list then it should go red background

I tried conditional formatting but it doesnt work if user answers No for question 1 because then I am deleting every other cell.

Please can you show me,
I tried couple if statements from google and none of them worked, nothing is changing fill color of dropdown :(

this is the code i tried last time after giving up

Sub Simple_if()
If Sheet1.Range("B1").Value = Sheet2.Range("A1").Value Then Cell.Interior.ColorIndex = 6
End If
End Sub
 

Attachments

  • 2020-11-12 16_03_43-test.xlxm.xlsm - Excel.png
    2020-11-12 16_03_43-test.xlxm.xlsm - Excel.png
    1.3 KB · Views: 26

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,223,246
Messages
6,170,999
Members
452,373
Latest member
TimReeks

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