Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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






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
Target.Offset(0, 36).Value Help Matt Excel Discussion (Misc queries) 0 April 1st 10 05:56 PM
what does target.offset(0,-1).select mean here? clara Excel Programming 1 April 24th 07 08:38 PM
Target.Address Doesn't Work in Excel 97? JK Excel Programming 3 September 27th 05 04:15 AM
Assumed Lunch Jeff Excel Discussion (Misc queries) 2 March 20th 05 05:35 AM
Target Offset? Otto Moehrbach[_3_] Excel Programming 3 July 27th 03 10:39 PM


All times are GMT +1. The time now is 12:48 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"