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: 5

Some videos you may like

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Watch MrExcel Video

Forum statistics

Threads
1,118,134
Messages
5,570,364
Members
412,321
Latest member
Yusuf_A
Top