Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All working thanks!!!!
wrote: I am getting the message invalid or unqualified reference for the .rows in the following line. LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row Any ideas? Thanks Dave Peterson wrote: I'd insert a new COLUMN A. Dave Peterson wrote: I'd insert a new row A. Then pick out a column that always has data: Option Explicit Sub testme02() Dim wks As Worksheet Dim LastRow As Long Set wks = ActiveSheet With wks .Range("a1").EntireColumn.Insert LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row With .Range("a1:A" & LastRow) .Formula = "=row()" .Value = .Value End With End With End Sub wrote: Hi, I need to insert row numbers to a csv file that is generated from a spreadsheet of data. Thought I could user NumberRows() but not sure if this is correct. Could someone tell me the best way to insert row numbers for each row of data. The amount of data varies each time the csv file is generated. Thanks Steve -- Dave Peterson -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert Row numbers | Excel Discussion (Misc queries) | |||
how do I insert Item numbers | Excel Discussion (Misc queries) | |||
how to insert page numbers | Excel Discussion (Misc queries) | |||
how do I insert an ' in front of many rows of numbers? | Excel Programming | |||
Macro to insert numbers | Excel Programming |