Sunday 15 April 2012

How do I create an excel macro that changes the rows spanned by a cell -


I am pasting the table in SAS where the first column has the number of rows spaced by the cell. It is to say that sometimes the first column is 3 merged cells, sometimes it is 6, etc. I will run a macro which converts the height of the cell into 10 merged cells, and space for it to insert the rows below.

How can I reach this problem, a little bit stumped about this, any assistance would be most appreciated.

Try to explain to me if I wanted the first column in all four rows, then I

  _________________ | _________________ | __________ | __________ | _________________ | __________ can start with  

and

  _________________ | __________ | __________ | _________________ | __________ | __________ | __________ | _________________ | Class = "post-text" itemprop = "text"> 

Ending with __________

Your first example, you show two merged cells with address ranges of A1: A2 and A3: A6 . In your second illustration, the address is A1: A4 and A5: A8 respectively .

"Change the height" for Excel (I'm using that phrase with loose) in the original merged cells at A1: A2 address, in fact the address range < Code> A1: A4 will create a new set-up merged cells. However, you will not be able to do this because the address A3: A6 is already a merged limit and it will overlap.

If you try to do this manually, you know that you have to unplug the following group, have to remade the top group, and have to rebuild the group below.

You can write a macro, which, when executed, an input box that pops up must be asked by the number of high cells in the merged cell. However, your code will need to analyze the original stack of the merging original cells, and then the program must be completely unplanned and reproduced to change the change. This is definitely possible, but it can be a real pain (but it is also a fun challenge :).

I ask myself, what exactly are you looking for, not exactly accurate behavior in Excel


My original post is below: Now since it has become obsolete, now I understand what the author is saying

You can use something like this:

  Rows ("1: 1"). RowHeight = 27.75  

However, I'm confused with your reference for merged cells. Are you just trying to change the height of a cell or do you merge the cell together Trying to do?


No comments:

Post a Comment