To the last row
Closed
Vaqas
-
Aug 25, 2009 at 05:10 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Aug 25, 2009 at 09:34 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Aug 25, 2009 at 09:34 PM
Related:
- To the last row
- Saints row 2 cheats - Guide
- How to delete a row in a table in word - Guide
- Vba last non empty row - Guide
- Saints row free download - Download - Action and adventure
- Vba change row color - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Aug 25, 2009 at 09:34 PM
Aug 25, 2009 at 09:34 PM
if you can tell us what you want to do clearly newsgroup may be able to help you.
recording the macro by making the steps is fine for learning vba. but once macro is recorded you must edit it. in vba you need not select every time for e.g.
instead of
Range("J2").Select
ActiveCell.FormulaR1C1 = "=MONTH(TODAY())"
you can have just one line
range("I2").formula="=month(today())"
better first prepare some sort of a flow diagram what you want to do on paper and then follow that in recording the macro and edit the macro to remove unnecessary line and generalise it.
for e.g
there are following code statements
Columns("J:J").Select
Selection.Insert Shift:=xlToRight
later
Columns("J:J").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
why insert and again delete a column
recording the macro by making the steps is fine for learning vba. but once macro is recorded you must edit it. in vba you need not select every time for e.g.
instead of
Range("J2").Select
ActiveCell.FormulaR1C1 = "=MONTH(TODAY())"
you can have just one line
range("I2").formula="=month(today())"
better first prepare some sort of a flow diagram what you want to do on paper and then follow that in recording the macro and edit the macro to remove unnecessary line and generalise it.
for e.g
there are following code statements
Columns("J:J").Select
Selection.Insert Shift:=xlToRight
later
Columns("J:J").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
why insert and again delete a column