I orginally posted this inquiry in Excel General but now that the answer is clearly VBA programming I was hoping for some assistance from this room. The original post is
http://www.excelforum.com/showthread.php?t=649936
I am very novice in programing with VBA and I have been provided a macro that needs editing. It is very important to get the spacing correct on the sheet that I am working, and unfortunately there is no way to getting around using a merged cell. The problem:
I have a Merged cell that is using a concatenate formula and depending on the circumstances has the possibility to be anywhere from 1 to 7 lines long. Since the cell is a merged cell it will not autofit.
The solution that was provided to me was:
This solution is a good start but I have a problem that I beleive can be edited out of the program but I do not know where to start.
Problem 1:
My merged cell has the possibility to be between 1 and 7 lines.
If the Merged Cell is:
1 Line, Macro Result = 15 point height (correct)
2 Lines, Macro Result = 45 point height (incorrect should be 30)
3 Lines, Macro Result = 75 point height (incorrect should be 45)
4 Lines, Macro Result = 75 point height (incorrect should be 60)
5 Lines, Macro Result = 105 point height (incorrect should be 75)
6 Lines, Macro Result = 135 point height (incorrect should be 90)
7 Lines, Macro Result = 150 point height (incorrect should be 105)
Problem 2: (minor cosmetic)
When the input data goes from large to small the cell height does not reduce in size.
Any assistance in editing this macro would be greatly appreciated
Bookmarks