Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
More on merged cells
I loop through the cells in a range and sometimes, the cell will be part
of the merged area. How do I find out whether the position of the cell within the merged area? For instance, if the cell is 2nd from the top and 5th from the left. How do I find out this information? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
More on merged cells
Dim rng as Range, cell as Range
Dim offsetrw as long, offsetcol as long set cell = Range("B9") set rng = Range("B9").MergeArea if rng.Count 1 then offsetrw = cell.row - rng(1).row + 1 offsetcol = cell.column = rng(1).column + 1 msgbox " row offset: " & offsetrw & vbNewline & _ " column offset: " & offsetcol End if -- Regards, Tom Ogilvy "Frank Rizzo" wrote in message ... I loop through the cells in a range and sometimes, the cell will be part of the merged area. How do I find out whether the position of the cell within the merged area? For instance, if the cell is 2nd from the top and 5th from the left. How do I find out this information? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy paste non merged to merged cells | Excel Worksheet Functions | |||
How can I sort an Excel Doc containing merged & non-merged cells? | Excel Discussion (Misc queries) | |||
Autofit Merged cell Code is changing the format of my merged cells | Excel Discussion (Misc queries) | |||
how do i link merged cells to a merged cell in another worksheet. | Excel Worksheet Functions | |||
Sorting merged cellsHow do I sort merged cells not identically siz | Excel Worksheet Functions |