![]() |
target.offset(0,-1) does not work as assumed
Hi all,
if cell a1 and b1 are merged and c1 and d1 are merged. if target = c1, then target.offset(0,-1) refer to b1 not a1 and b1 merged area. How can I do it? Clara -- thank you so much for your help |
target.offset(0,-1) does not work as assumed
Clara,
Target.Offset(0, -1).MergeArea.Cells(1, 1).Value HTH, Bernie MS Excel MVP "clara" wrote in message ... Hi all, if cell a1 and b1 are merged and c1 and d1 are merged. if target = c1, then target.offset(0,-1) refer to b1 not a1 and b1 merged area. How can I do it? Clara -- thank you so much for your help |
target.offset(0,-1) does not work as assumed
Hi Bernie,
Let's go further, if A1 And B1 , c1 ANd D1, E1 And F1 are merged seperately, then target is on E1 And F1 mearged area, could you using target.offset(0,-1).offset(0,-1) to refer to A1 and B1 area ? Clara -- thank you so much for your help "Bernie Deitrick" wrote: Clara, Target.Offset(0, -1).MergeArea.Cells(1, 1).Value HTH, Bernie MS Excel MVP "clara" wrote in message ... Hi all, if cell a1 and b1 are merged and c1 and d1 are merged. if target = c1, then target.offset(0,-1) refer to b1 not a1 and b1 merged area. How can I do it? Clara -- thank you so much for your help |
target.offset(0,-1) does not work as assumed
Clara,
Target.Offset(0, -1).MergeArea.Cells(1, 1).Offset(0, -1).MergeArea.Cells(1, 1).Value HTH, Bernie MS Excel MVP "clara" wrote in message ... Hi Bernie, Let's go further, if A1 And B1 , c1 ANd D1, E1 And F1 are merged seperately, then target is on E1 And F1 mearged area, could you using target.offset(0,-1).offset(0,-1) to refer to A1 and B1 area ? Clara -- thank you so much for your help "Bernie Deitrick" wrote: Clara, Target.Offset(0, -1).MergeArea.Cells(1, 1).Value HTH, Bernie MS Excel MVP "clara" wrote in message ... Hi all, if cell a1 and b1 are merged and c1 and d1 are merged. if target = c1, then target.offset(0,-1) refer to b1 not a1 and b1 merged area. How can I do it? Clara -- thank you so much for your help |
All times are GMT +1. The time now is 03:41 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com