Number of cells in merged cell

B

Brad

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
 
D

Dave Peterson

With ActiveCell.MergeArea
MsgBox .Rows.Count & vbLf & .Columns.Count & vbLf & .Address(0, 0)
End With
 
B

Brad

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
 
B

Brad

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top