- Cells.Select -> select all cells in worksheet
- Range("A1").Select, Cells(1,1).Select -> select cell A1
- Range("A1").Value, Cells(1,1).Value -> return value of cell A1
- Rows(1).EntireRow.Select -> select entire row number 1
- Columns("A:B").EntireColumn.Select -> select entire column A and B
- Selection.CurrentRegion.Select -> select current cell region
- ActiveCell.Row, ActiveCell.Column -> return row or column number of active cell
- Selection.Rows.Count, Selection.Columns.Count -> return quantity of row or column of selected area
- Selection.CurrentRegion.Rows.Count, Selection.CurrentRegion.Columns.Count -> return quantity of row or column of current cell region
- Range("A1").Formula = "=B1+B2" -> create a formula =B1+B2 in cell A1
- Range("A1").FormulaR1C1 = "=RC[1]+R[1]C[1]" -> create a formula = B1+B2 in cell A1
Tuesday, January 24, 2012
Excel VBA command (1)
Cell and Range
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment