Hello Experts,
I have a large data set with around 150 columns. I want to change the cell color in a given column based on the criteria.
Example of column Name : Plan A, Plan B, Plan C
1. If "Plan A" column has a cell value except 'Hard' or 'Soft', then the rest of the cells should be changed to yellow color.
2. If "Plan A" columns has a cell value except 'Hard' or 'Soft', however columns "Plan B" or "Plan C" says 'NA', no need to change the color.
For the above scenarios I have written VB using If then else using the column reference which is hard coded, and its working as I expected, however if there is interchange or reorder in the columns, then my current code is not working.
I'm looking for a Dynamic code if my above columns (Plan A, Plan B, Plan C etc) can be anywhere in my worksheet of around 150 columns, the above conditions should meet and the cell colors accordingly. (I want code using the Column Header Name)
I have a large data set with around 150 columns. I want to change the cell color in a given column based on the criteria.
Example of column Name : Plan A, Plan B, Plan C
1. If "Plan A" column has a cell value except 'Hard' or 'Soft', then the rest of the cells should be changed to yellow color.
2. If "Plan A" columns has a cell value except 'Hard' or 'Soft', however columns "Plan B" or "Plan C" says 'NA', no need to change the color.
For the above scenarios I have written VB using If then else using the column reference which is hard coded, and its working as I expected, however if there is interchange or reorder in the columns, then my current code is not working.
I'm looking for a Dynamic code if my above columns (Plan A, Plan B, Plan C etc) can be anywhere in my worksheet of around 150 columns, the above conditions should meet and the cell colors accordingly. (I want code using the Column Header Name)