GingerCoder
New Member
- Joined
- Feb 2, 2018
- Messages
- 5
Hello,
I have a spreadsheet where based on what value is input, certain cells are hidden. Most all of my rows contain merged cells. I am looking for a code that will autofit my merged cells and still allow them to be hidden based on other code. I found a code where the autofit works, but the rows do not hide based on the other code...i.e.
Range("D5:H5").Rows.AutoFit
Range("B9:N9").Rows.AutoFit
Range("B12:N12").Rows.AutoFit
Range("B15:N15").Rows.AutoFit
Range("D28:N28").Rows.AutoFit
Range("D48:N48").Rows.AutoFit
Suggestions?
I have a spreadsheet where based on what value is input, certain cells are hidden. Most all of my rows contain merged cells. I am looking for a code that will autofit my merged cells and still allow them to be hidden based on other code. I found a code where the autofit works, but the rows do not hide based on the other code...i.e.
Range("D5:H5").Rows.AutoFit
Range("B9:N9").Rows.AutoFit
Range("B12:N12").Rows.AutoFit
Range("B15:N15").Rows.AutoFit
Range("D28:N28").Rows.AutoFit
Range("D48:N48").Rows.AutoFit
Suggestions?