ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Indent and fill color based on other columns data (https://www.excelbanter.com/excel-programming/425327-indent-fill-color-based-other-columns-data.html)

CB

Indent and fill color based on other columns data
 
I need some advice on how to automatically update the formatting in a
spreadsheet.

I have data in Columns A:J. I would like to fill color gray for A2:H2 if
Col J 2 = Yes. I would also like to indent column B the following spaces
based on a number in column H.
Example:

If Column H2 = 2 then indent H2 text 3 spaces
If Column H2 = 3 then indent H2 text 6 spaces
If Column H2 = 4 then indent H2 text 9 spaces
If Column H2 = 5 then indent H2 text 12 spaces
If Column H2 = 6 then indent H2 text 15 spaces

I would like VBA if that is possible.

thanks in advance
clvl

CB

Indent and fill color based on other columns data
 
The SS may have 10 to 1000 rows of data.

"CB" wrote:

I need some advice on how to automatically update the formatting in a
spreadsheet.

I have data in Columns A:J. I would like to fill color gray for A2:H2 if
Col J 2 = Yes. I would also like to indent column B the following spaces
based on a number in column H.
Example:

If Column H2 = 2 then indent H2 text 3 spaces
If Column H2 = 3 then indent H2 text 6 spaces
If Column H2 = 4 then indent H2 text 9 spaces
If Column H2 = 5 then indent H2 text 12 spaces
If Column H2 = 6 then indent H2 text 15 spaces

I would like VBA if that is possible.

thanks in advance
clvl



All times are GMT +1. The time now is 12:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com