LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default Tricky OFFSET routine

In the following code:

Cells(65536, 13).End(xlUp).End(xlUp).FormulaR1C1 = _

"=SUMIFS(R[0]C26:R[0]C45,INDIRECT(""$Z""&ROW(OFFSET(R[0]C,ROW(R1220C13)-ROW(R[0]C),0))&"":""&""$AS""&ROW(OFFSET(R[0]C,ROW(R1220C13)-ROW(R[0]C),0))),""k"")"

.... Need the first row the offset formula is looking for, in this case 1220,
to *always* be -2, or in other works 2 rows above what 0 is.
Which in this case would indeed be 1220, but if r[0] is actually row 8 the
offset would look to row 6 to subtract row 8.

So in short, r1220 needs to be r-2 .... however that can be formulated.

Have tried many syntaxes that result in the routine stopping, but am sure
there is an easy answer.
If anyone can help, it would be sincerely appreciated.

Thanx,
- Mike
 
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
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Programming 4 September 28th 07 09:59 PM
Find, Copy offset to offset on other sheet, Run-time 1004. Finny[_3_] Excel Programming 10 December 7th 06 11:46 PM
Tricky Tricky episode 2!!! mhax[_13_] Excel Programming 5 July 21st 06 03:15 PM
Tricky Tricky episode 2!!! Bernie Deitrick Excel Programming 0 July 20th 06 07:01 PM


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