LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Eric
 
Posts: n/a
Default retrieve text from merged cells

I have several cells in a single column merged into one cell.
Before merging the top cell had text and the other cells in the "to be"
merged area had no text. Then i merged them. ok so far.
Now i have a macro that iterates down the rows. some rows are ordinary rows
and in some places they are part of a merged area (in a single column)

My question is: How do i read the text in the merged cell?

str = Cells.Item(mRow, mCol).Value sometimes produces str==""
when it hits a row that contains part of a merged cell

str = Cells.Item(mRow, mCol).MergedCells.Text is the kind of thing i need.
How do you do that?

Thanks
Eric
 
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
Make Autofit row height work with merged cells Franketh Excel Discussion (Misc queries) 2 April 6th 05 09:13 PM
I want Excel to allow cells with formulas and unrelated text blueboy Excel Discussion (Misc queries) 9 March 4th 05 12:22 AM
Autofit row height in merged cells BobT Excel Discussion (Misc queries) 1 February 25th 05 04:44 PM
Adding two text cells together Audrey Excel Discussion (Misc queries) 4 February 24th 05 09:57 PM
Excel merged cell - can it automatically expand as text is typed? Joanne (JAS) New Users to Excel 2 January 8th 05 12:11 AM


All times are GMT +1. The time now is 04:23 PM.

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

About Us

"It's about Microsoft Excel"