Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
some doubts....
dear all, can clear my doubts? thanks in advance.
1) how do you guys know the syntax of the statement? i know you guys might say from experience. i really impressed by you guys knowledge on the script. 2) what is this xl means? i notice xl tied with other verb like up, filldefault, pastevalues,..... lastrow = Range("C" & Rows.Count).End(xlUp).Row 3) how do i know when to use application? totalsum = Application.WorksheetFunction.Sum(Range("e2:e" & lastrow)) 4) what is R1C1? i notice in macro use quite often. it means first row first column? but not all the time i select that cell, right? ActiveCell.FormulaR1C1 = "=TEXT(RC[-8]*100,""000000000000000"")" thanks again. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
some doubts....
1) It is experience, practice, and just interest that makes you read up on
the subject, and get to it. Remember, there are really two syntaxes involved, the VB syntax (If, For .. Next, etc.), and the host application object model (workbook.worksheet, range , etc.) 2) Go to the very end of column C (Range("C" & Rows.Count), and work back until a non-empty cell (End(xlUp)), and store the row number in the variable lastrow (lastrow = ...Row) 3) From experience, and checking help or the NGs when it doesn't work. 4) R1C1 notation is using row and column numbers rather than column letters (A1 notation). It is useful when working with variables to define the row and/or column, rather than converting the column number to a letter (gets tricky with AA etc.). This statement ActiveCell.FormulaR1C1 = "=TEXT(RC[-8]*100,""000000000000000"")" is adding a formula to the activecell in R1C1 style, with the formula pointing to that same row, but a column 8 to the left. So if activecell is M10, the formula will pick up a value in E10. -- HTH RP "tango" wrote in message om... dear all, can clear my doubts? thanks in advance. 1) how do you guys know the syntax of the statement? i know you guys might say from experience. i really impressed by you guys knowledge on the script. 2) what is this xl means? i notice xl tied with other verb like up, filldefault, pastevalues,..... lastrow = Range("C" & Rows.Count).End(xlUp).Row 3) how do i know when to use application? totalsum = Application.WorksheetFunction.Sum(Range("e2:e" & lastrow)) 4) what is R1C1? i notice in macro use quite often. it means first row first column? but not all the time i select that cell, right? ActiveCell.FormulaR1C1 = "=TEXT(RC[-8]*100,""000000000000000"")" thanks again. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
xy chart doubts | New Users to Excel | |||
excel doubts | Excel Discussion (Misc queries) | |||
Microsoft Excel doubts | Excel Discussion (Misc queries) | |||
Two doubts for Macros | Excel Discussion (Misc queries) | |||
I have doubts about Create Lines Charts | Charts and Charting in Excel |