Anyone have some code that can programatically adjust the col width. Data are imported each week and number of cols may change, hoping that this can be done without user intervention to loop through each col and based on the char length of the "header" would set the col width accordingly. Example:
len(F2) is 7 then width = 10
Perhaps rather than specific lengths was thinking length range
If len("COL")<09 then width = 9
If len("COL")=09 then width = 10
If len("COL")>09 then width = 12
For this particular case, the width adjustments would begin at Col E until last col of data is encountered. This week's file ends at Col DM. next week could end before or after that.
Thanks.
len(F2) is 7 then width = 10
Perhaps rather than specific lengths was thinking length range
If len("COL")<09 then width = 9
If len("COL")=09 then width = 10
If len("COL")>09 then width = 12
For this particular case, the width adjustments would begin at Col E until last col of data is encountered. This week's file ends at Col DM. next week could end before or after that.
Thanks.