Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Need help with VB codes. I am extracting data from a worksheet form into a data collection worksheet. The worksheet has pre-existing rows of headers and labels. I want to auto generate the serial numbers in column A of the data collection worksheet. I am stuck trying to establish the first serial number as "1". Is it possible to code such that: If the cell above is in column A < "integer" then value in active cell = 1 I get a syntex error with the following:- With historyWks nextRow = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0).Row End With If historyWks.Cells(nextRow, "A").Offset(-1, 0) < integer Then historyWks.Cells(nextRow, "A").Value = 1 Else historyWks.Cells(nextRow, "A").Value = historyWks.Cells(nextRow, "A").Offset(-1, 0).Value + 1 End If 'Perhaps there is a better way to do this. Appreciate some help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto Serial No | Excel Discussion (Misc queries) | |||
A Macro to find missing serial numbers in a column | Excel Discussion (Misc queries) | |||
Auto number / macro creation | Excel Discussion (Misc queries) | |||
Auto number w/ different letter-number combos in same column | Excel Worksheet Functions | |||
Set the serial number every 15th column | Excel Discussion (Misc queries) |