Fawks
1) If your data is contiguous, as it should be in a list and the headers are
in row 1. this should give you the last row number
Sub findlastrow()
Dim lLastRow As Long
lLastRow = Application.WorksheetFunction.CountA(Range("A:A"))
End Sub
2) Added to number 1
Sub FillNewSeries()
Dim lLastRow As Long
lLastRow = Application.WorksheetFunction.CountA(Range("A:A"))
With Range("F1")
.Value = "1"
.AutoFill Destination:=Range("F1:F" & lLastRow), Type:=xlFillSeries
End With
End Sub
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web: www.excelusergroup.org
web:
www.nickhodge.co.uk
"Fawks" wrote in message
...
I'm trying to build a worksheet to store all of my DVD's on. This will
include columns with Title, Wide/Full, Director, Actor, Actress, Release
Date, ... (the columns may grow as needed/desired)
1. I'm trying to write a macro that will find the bottom row that has data
on it.
2. Then what I want to do is Sort the data by title or director or
actress,
3. Copy all of the worksheet to a SortedByTitle, SortedByDirector etc.
worksheet,
4. Add an index column that goes from 1 to (bottom row),
5. Save SortedByX worksheet as html file.
Essentially I want to view the sorted html file on my PDA and have it show
the row number for each title. Eventually, I will need to break this up
into
smaller html pages (i.e. rows 001-50.html, 051-100.html, 101-150.html and
so
on), but that is way on down the line.
I CAN do numbers 2, 3 and 5. I need HELP finding out how to do numbers 1
and 4.
Thanks