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: 112
Default Help with OFFSET Problem Please

Hi,

I have Two Macros that Work Well Except for One thing.
I want the First Macro to Produce Results in Cells "A1:C100", then Cells
"F1:H100" and then Cells "K1:M100" etc. For this the Code Below Works
Fine :-

For i = 1 To nMaxF - 1
For j = i + 1 To nMaxF
nCount = nCount + 1
If nCount = 101 Then
nCount = 1
ActiveCell.Offset(-100, 5).Select
End If
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(-1, 0).Value = i
ActiveCell.Offset(-1, 1).Value = j
ActiveCell.Offset(-1, 2).Value = nTest1(i, j)
Next j
Next i

The Second Macro is Called from the First Macro and I want to Produce
Results in Cells "D1:D100", then Cells "I1:I100" and then Cells
"N1:N100" etc. For this the Code Below Does NOT Work, it Gives a '1004'
Error :-

For i = 1 To nMaxF - 1
For j = i + 1 To nMaxF
nCount = nCount + 1
If nCount = 101 Then
nCount = 1
ActiveCell.Offset(-100, 5).Select
End If
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(-1, 3).Value = nTest2(i, j)
Next j
Next i

It is the Above Line …
ActiveCell.Offset(-100, 5).Select
… that is Giving the Error.

If in the Two Macros I Do NOT Use Offset, Everything is Fine.

Any Help will be Appreciated.
All the Best.
Paul

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
Offset Problem Dawn Excel Discussion (Misc queries) 4 June 11th 08 06:44 PM
OFFSET PROBLEM txm49 Excel Discussion (Misc queries) 2 October 11th 07 08:15 PM
Offset VBA Problem jlclyde Excel Discussion (Misc queries) 3 September 18th 07 04:00 PM
OFFSET problem Sheela Excel Programming 0 December 26th 03 05:03 AM
Offset Problem cford31 Excel Programming 4 November 10th 03 03:11 PM


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