Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Number of cells in merged cell
Thanks for taking the time to read my quetion.
I am trying to determine how many rows and columns are in my merged cell. I can't seem to figure out how to do that. I'm working with If ActiveCell.MergeCells then which tells me if the current cell is a merged one, but I can't get anything else to work that will tell me how many cells are involved in the merge. Thanks, Brad |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Number of cells in merged cell
maybe this is what you want activecell.MergeArea.Count -- Gary "Brad" wrote in message ... Thanks for taking the time to read my quetion. I am trying to determine how many rows and columns are in my merged cell. I can't seem to figure out how to do that. I'm working with If ActiveCell.MergeCells then which tells me if the current cell is a merged one, but I can't get anything else to work that will tell me how many cells are involved in the merge. Thanks, Brad |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Number of cells in merged cell
With ActiveCell.MergeArea
MsgBox .Rows.Count & vbLf & .Columns.Count & vbLf & .Address(0, 0) End With Brad wrote: Thanks for taking the time to read my quetion. I am trying to determine how many rows and columns are in my merged cell. I can't seem to figure out how to do that. I'm working with If ActiveCell.MergeCells then which tells me if the current cell is a merged one, but I can't get anything else to work that will tell me how many cells are involved in the merge. Thanks, Brad -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Number of cells in merged cell
Sheer Genius!!
Thanks Dave. I got as far as getting the address of the MergeArea, but couldn't figure out how to get the number of rows and columns. I was contemplating using the address as a string and converting the letters to numbers etc. You way is much better! Thanks again. Brad "Dave Peterson" wrote: With ActiveCell.MergeArea MsgBox .Rows.Count & vbLf & .Columns.Count & vbLf & .Address(0, 0) End With Brad wrote: Thanks for taking the time to read my quetion. I am trying to determine how many rows and columns are in my merged cell. I can't seem to figure out how to do that. I'm working with If ActiveCell.MergeCells then which tells me if the current cell is a merged one, but I can't get anything else to work that will tell me how many cells are involved in the merge. Thanks, Brad -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Number of cells in merged cell
Hi Dave,
I'm trying to implement this using Cells(row,col).MergeArea, but it's not working. I really need to use Cells() and I don't want to set ActiveCell = Cells() as I don't want to see the screen move all over the place. Can this be done? Brad "Dave Peterson" wrote: With ActiveCell.MergeArea MsgBox .Rows.Count & vbLf & .Columns.Count & vbLf & .Address(0, 0) End With Brad wrote: Thanks for taking the time to read my quetion. I am trying to determine how many rows and columns are in my merged cell. I can't seem to figure out how to do that. I'm working with If ActiveCell.MergeCells then which tells me if the current cell is a merged one, but I can't get anything else to work that will tell me how many cells are involved in the merge. Thanks, Brad -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Number of cells in merged cell
I just found my mistake. No more issue.
Thanks again Dave, Brad "Brad" wrote: Hi Dave, I'm trying to implement this using Cells(row,col).MergeArea, but it's not working. I really need to use Cells() and I don't want to set ActiveCell = Cells() as I don't want to see the screen move all over the place. Can this be done? Brad "Dave Peterson" wrote: With ActiveCell.MergeArea MsgBox .Rows.Count & vbLf & .Columns.Count & vbLf & .Address(0, 0) End With Brad wrote: Thanks for taking the time to read my quetion. I am trying to determine how many rows and columns are in my merged cell. I can't seem to figure out how to do that. I'm working with If ActiveCell.MergeCells then which tells me if the current cell is a merged one, but I can't get anything else to work that will tell me how many cells are involved in the merge. Thanks, Brad -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I repeat a format of 2 merged cells to a number of rows in. | Excel Discussion (Misc queries) | |||
Autofit Merged cell Code is changing the format of my merged cells | Excel Discussion (Misc queries) | |||
Count number of characters in merged cells + adjusting rowheight | Excel Programming | |||
how do i link merged cells to a merged cell in another worksheet. | Excel Worksheet Functions | |||
Max number if characters in a merged cell | Excel Discussion (Misc queries) |