2. You need to be explicit about the second condition eg....
If ActiveCell.Row <> 1 or ActiveCell.Row <> 2 Then
While it is not clear what the OP means exactly by 1 or 2, I would suspect
he wants something like
If ActiveCell.Row <> 1 and ActiveCell.Row <> 2 then
I say this, because I would be hard pressed to come up with an activecell
that did not meet one of the conditions of not being row 1 or not being row
2 as stated using an OR connector.
If I am right, then a less explicit (but equally effective) approach might
be
if ActiveCell.Row > 2 then
of
If ActiveCell.row >= 3 then
--
Regards,
Tom Ogilvy
Nigel said:
1. The following will return the last row number with data and susbstitue
into the select
Dim lstrow As Long
lstrow = Sheets("WSname").Cells(Rows.Count, "A").End(xlUp).Row
Range("A" & lstrow).Select
2. You need to be explicit about the second condition eg....
If ActiveCell.Row <> 1 or ActiveCell.Row <> 2 Then
Cheers
Nigel
scrabtree23 said:
1) In Column A:A I want to select A3: the last cell in that column with data
in it (non-empty cell).
2) On this code = [ If ActiveCell.Row <> 1 Then ] I want to expand it to
If ActiveCell.Row <> 1 or 2 Then. But the "or 2" is throwing things
off???