indianspring
New Member
- Joined
- Apr 19, 2008
- Messages
- 22
I have a macro that I need to change column width of cells depending on a cell value.
As in if cell a1 = 1.11, a2=2.22, a3=3.33, I want the width of column b to be changed to 1.11 (a1) etc..
The problem is that a1,b1 and c1 will constantly be changing which is why I cant just set the solumn width values in the macro.
Thanks in advance for any help
I need 31 for example to equal whatever value is in cell a1.
As in if cell a1 = 1.11, a2=2.22, a3=3.33, I want the width of column b to be changed to 1.11 (a1) etc..
The problem is that a1,b1 and c1 will constantly be changing which is why I cant just set the solumn width values in the macro.
Thanks in advance for any help
HTML:
Columns("B:B").Select
Range("B2").Activate
Selection.ColumnWidth = 31
I need 31 for example to equal whatever value is in cell a1.