Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Merge cells with formula or macro? | Excel Discussion (Misc queries) | |||
Excel Macro - Merge Cells unavailable - Unable to figue out why. | Excel Worksheet Functions | |||
Macro to merge cells | Excel Programming | |||
Merge Cells in a column Macro | Excel Programming | |||
Merge cells using macro | Excel Programming |