Hallo
I'm trying to format some excel cells depending on some criteria.
For example I want that a specific number of rows is set to a certain height. The problem is that the range of rows can change. So I was thinking to use some variables instead of numbers:
.Rows("1:3").RowHeight = 36
This will set the height of row 1,2 and 3 to 36. Now I calculated some value and stored in variables:
start = 2
end = 5
and I would like to use this instead of the numbers:
.Rows(start:end).RowHeight = 36
but it doesn't work, at this point I don't know if I'm doing something completely wrong or if it's just a matter of syntax...
I'm trying to format some excel cells depending on some criteria.
For example I want that a specific number of rows is set to a certain height. The problem is that the range of rows can change. So I was thinking to use some variables instead of numbers:
.Rows("1:3").RowHeight = 36
This will set the height of row 1,2 and 3 to 36. Now I calculated some value and stored in variables:
start = 2
end = 5
and I would like to use this instead of the numbers:
.Rows(start:end).RowHeight = 36
but it doesn't work, at this point I don't know if I'm doing something completely wrong or if it's just a matter of syntax...