I am newish at VBA but I cannot figure out how to make this work. I am copying a ton of data from a another Excel sheet and then deleting the unneeded rows. The problem is that I need my data numbered in column A and when I delete the row it skips numbers. I want a macro that will number my data after I delete the unneeded lines. I do need it to stop when my data stops but the number of lines will be different each time. Any tips? Thank you.
相关问题
- Excel sunburst chart: Some labels missing
- Error handling only works once
- Error handling only works once
- Excel formula in VBA code
- Excel VBA run time error 450 from referencing a ra
相关文章
- Get column data by Column name and sheet name
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
- Unregister a XLL in Excel (VBA)
- How to prevent excel from truncating numbers in a
- numeric up down control in vba
- Declare a Range relative to the Active Cell with V
- What's the easiest way to create an Excel tabl
You may try something like this...
After deleting rows, run the following code which will add the sequence number in column A starting from row2.
Use union method. You collect range and at the last line, delete them.