Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help with merge cells in a macro

Hello all,

I am writing a macro that needs to cycle through all the
active rows with in the active sheet, and filter out all
the rows that contain a date that is not in the specified
paramaters.

My problem is that some of these rows have merged cells
and when I lter out a row, it leaves behind the ones that
were merged with it. I need all the rows to disappear.

I was thinking that I could check to see if the row was
merged first and capture the address of the merged
fields. Then I would unmerge the rows and populate the
newly unmerged cells with what was in the original cell.

I can check if the cells are merged by:

If Range("myRange").MergeCells then
Set merge = Range("myRange").MergeArea
addr = merge.address
val = Range("myRange").Value

This is as far as I know.
How can I assign the value of the merged cells to all the
cells once they are unmerged?
Please help.

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Need help with merge cells in a macro

I figured it out. Thanks anyways.

Armando
-----Original Message-----
Hello all,

I am writing a macro that needs to cycle through all the
active rows with in the active sheet, and filter out all
the rows that contain a date that is not in the specified
paramaters.

My problem is that some of these rows have merged cells
and when I lter out a row, it leaves behind the ones that
were merged with it. I need all the rows to disappear.

I was thinking that I could check to see if the row was
merged first and capture the address of the merged
fields. Then I would unmerge the rows and populate the
newly unmerged cells with what was in the original cell.

I can check if the cells are merged by:

If Range("myRange").MergeCells then
Set merge = Range("myRange").MergeArea
addr = merge.address
val = Range("myRange").Value

This is as far as I know.
How can I assign the value of the merged cells to all the
cells once they are unmerged?
Please help.

Thank you.
.

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
Merge cells with formula or macro? Joe M. Excel Discussion (Misc queries) 5 July 23rd 07 10:28 PM
Excel Macro - Merge Cells unavailable - Unable to figue out why. newexceluser Excel Worksheet Functions 0 January 18th 06 03:22 PM
Macro to merge cells JA Excel Programming 0 June 3rd 04 03:39 PM
Merge Cells in a column Macro Mike G. Excel Programming 1 May 18th 04 05:34 PM
Merge cells using macro Tom Ogilvy Excel Programming 0 August 7th 03 07:20 PM


All times are GMT +1. The time now is 11:17 AM.

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"