Make a particular cell the active one

  • Thread starter Thread starter Newbie
  • Start date Start date
N

Newbie

Hi,
I use the following to get the last row number used

lastUsedRow = Worksheets("Sheet1").UsedRange.Row +
Worksheets("Sheet1").UsedRange.Rows.Count - 1

How can I use the lastUsedRow variable so that I can make column F and the
lastUsedRow varialbe the active cell.

eg. lastUsedRow = 241 therefore I want F241 to become the active cell
 
Newbie said:
Hi,
I use the following to get the last row number used

lastUsedRow = Worksheets("Sheet1").UsedRange.Row +
Worksheets("Sheet1").UsedRange.Rows.Count - 1

How can I use the lastUsedRow variable so that I can make column F
and the lastUsedRow varialbe the active cell.

eg. lastUsedRow = 241 therefore I want F241 to become the active cell

Cells(lastUsedRow, 6).Activate
 
Hi
try
cells(lastUsedRow,"F").select

--
Regards
Frank Kabel
Frankfurt, Germany

Hi,
I use the following to get the last row number used

lastUsedRow = Worksheets("Sheet1").UsedRange.Row +
Worksheets("Sheet1").UsedRange.Rows.Count - 1

How can I use the lastUsedRow variable so that I can make column F
and the lastUsedRow varialbe the active cell.

eg. lastUsedRow = 241 therefore I want F241 to become the active
cell
 
Thanks for your help.
I tried:
cells(lastUsedRow,"F").select
but get the error 1004 Select method of Range class failed
and then I tried:
Cells(lastUsedRow, 6).Activate
but get the error 1004 Activate method of Range class failed

Here is the code I have what am I doing wrong?
lastUsedRow = ActiveSheet.UsedRange.Row + ActiveSheet.UsedRange.Rows.Count -
1
Cells(lastUsedRow, 6).Activate

Thanks again for your help
 
Back
Top