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: 23
Default Alternative to using .Select for cursor movement.

Bob:

I think I see what you're saying about the cells method. The formulas listed below were just off the wall examples. The 9* whatever was in no way a pattern in these first examples.

activecell.offset(1,0).formula = "=9*1"
activecell.offset(2,0).formula = "=9*2"
activecell.offset(3,0).formula = "=9*3"

I think the real deal with your cells method will go something like the example below. Notice that there is a combination of character expressions mixed in with references to spreadsheet ranges and indexes. So I guess I'll have to see if screenupdating may be necessary in this case to get those spreadsheet range values. But I guess what you're saying in your post is this Cells method is preferable to using the "activecell.offset(X,Y).formula =" approach?

activecell.offset(1,0).formula = "=FGS~FEE"
activecell.offset(2,0).formula = "=N1~PP~~75~0000000"
activecell.offset(3,0).formula = "=N1~C7~~75~000"

As opposed to the real world example here should go something like what is written below:

Application,.Screenupdating = False

For i = 1 To cRows ' will determine how many records to process by a crows approach
Cells(1,0).Formula = "=FGS~FEE"
Cells(2,0).Formula = "=N1~PP~~75~0000000"
Cells(3,0).Formula = "=N1~C7~~75~000"
Cells(4,0).Formula = "=N1~SY~~49~00000000000"
Cells(5,0).Formula = "=TIA~8605~~8"
Cells(6,0).Formula = "=TIA~8020~~0"
Cells(7,0).Formula = "=TIA~8025~~0"
Cells(8,0).Formula = "=TIA~8030~~0"
Cells(9,0).Formula = "=TIA~8030~~0"
Cells(10,0).Formula = "=TIA~8056~~~"&Fixed(INDEX(Summary,2,ROWSUM),0)&"~ FM"
Cells(11,0).Formula = "=TIA~8656~"&Fixed(INDEX(Summary,2,ROWSUM)*Cleanup feerate,2)
Cells(12,0).Formula = "=TIA~8230~~~"&FIXED(INDEX(Summary,2,ROWSUM),0)&"~ FM"
Cells(13,0).Formula = "=TIA~8065~0"
Cells(14,0).Formula ="=TIA~8070~0"
Cells(15,0).Formula ="=TIA~8200~0"
i = i + 1
Next

In QPW, the ~ character was for carriage return. If it was put in a line like the ones above, and you did not want the carriage return at that position, you had to enclose it in braces as such {~}. I am presuming Excel will not be confused in any way about the meaning of the character ~ ?




Bob's example was:

Application,.Screenupdating = False

For i = 1 To 100
Cells(i,1).Formula = "G*" & i
Next

...

Application.ScreenUpdating = True

If you don't know how many rows in advance, use that code I gave you before to determine the number of rows with data, the cRows = Cells(Rows.Count ...

--

HTH

Bob Phillips
 
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
Cursor Movement Froggy2899 Excel Discussion (Misc queries) 2 August 11th 08 10:54 PM
Cursor Movement? micah Excel Worksheet Functions 10 October 30th 07 04:18 AM
cursor movement Paulo Couto Excel Discussion (Misc queries) 5 October 25th 07 11:32 PM
Movement of cursor L... Excel Worksheet Functions 4 May 6th 06 03:48 AM
Cursor movement Ann Calantzis Excel Worksheet Functions 1 May 25th 05 04:18 PM


All times are GMT +1. The time now is 02:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"