Hello Everyone!</SPAN>
I am completely lost trying to write code to apply formatting based on certain conditions in VBA because I have never attempted to do this before. Can someone share with me how they would solve this to help give me some ideas? It is important that I apply the formatting using VBA and not using conditional formatting because I need the formatting to “stick” easily as it is copied and pasted to other worksheets.</SPAN>
So, let’s start with a simple example of what I am trying to do:</SPAN>
I have the following table:</SPAN>
Col A Col B</SPAN>
Company A 1.99 </SPAN>
Company B 2.99</SPAN>
Company C 0.00</SPAN>
Company D 0.00</SPAN>
If a company in the table has a price in Col b which is 0, then I want the color of the text for that cell to be changed to White. I also want this to happen for the cell to the left of that cell. </SPAN>
The next thing I would want to do is to change the background of the Cell in Col A that has the text “Company A” to Yellow and also make the same change to the Cell to the right of it.</SPAN>
Can someone help me out and point me in the right direction with some sample code?</SPAN>
I am completely lost trying to write code to apply formatting based on certain conditions in VBA because I have never attempted to do this before. Can someone share with me how they would solve this to help give me some ideas? It is important that I apply the formatting using VBA and not using conditional formatting because I need the formatting to “stick” easily as it is copied and pasted to other worksheets.</SPAN>
So, let’s start with a simple example of what I am trying to do:</SPAN>
I have the following table:</SPAN>
Col A Col B</SPAN>
Company A 1.99 </SPAN>
Company B 2.99</SPAN>
Company C 0.00</SPAN>
Company D 0.00</SPAN>
If a company in the table has a price in Col b which is 0, then I want the color of the text for that cell to be changed to White. I also want this to happen for the cell to the left of that cell. </SPAN>
The next thing I would want to do is to change the background of the Cell in Col A that has the text “Company A” to Yellow and also make the same change to the Cell to the right of it.</SPAN>
Can someone help me out and point me in the right direction with some sample code?</SPAN>