Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I repeat a format of 2 merged cells to a number of rows in. Tony D Excel Discussion (Misc queries) 4 June 22nd 08 08:44 PM
Autofit Merged cell Code is changing the format of my merged cells JB Excel Discussion (Misc queries) 0 August 20th 07 02:12 PM
Count number of characters in merged cells + adjusting rowheight Luc Excel Programming 3 April 28th 06 11:56 PM
how do i link merged cells to a merged cell in another worksheet. ibbm Excel Worksheet Functions 3 April 27th 06 11:40 PM
Max number if characters in a merged cell Dajana Excel Discussion (Misc queries) 1 September 7th 05 02:30 AM


All times are GMT +1. The time now is 07:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"