Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Make a particular cell the active one

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Make a particular cell the active one

Newbie wrote:
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

--
Regards,

Juan Pablo González


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Make a particular cell the active one

Hi
try
cells(lastUsedRow,"F").select

--
Regards
Frank Kabel
Frankfurt, Germany


Newbie wrote:
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Make a particular cell the active one

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

"Frank Kabel" wrote in message
...
Hi
try
cells(lastUsedRow,"F").select

--
Regards
Frank Kabel
Frankfurt, Germany


Newbie wrote:
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make identical cell datas active to allow changes caprey New Users to Excel 5 December 21st 08 05:42 PM
how do i make a chart follow the active cell mepetey Charts and Charting in Excel 2 October 20th 07 07:29 PM
I HAVE SAY INFO ACROSS 10 COLUMNS. HOW TO MAKE THE COL-A CELL ACTIVE WHEN U HIT 'ENTER' CAPTGNVR Excel Discussion (Misc queries) 4 February 5th 07 08:27 PM
How do I make it so that the active cell follows the cursor keys? jmitchener Excel Discussion (Misc queries) 2 September 10th 06 06:07 PM
How do I make the border of an active cell in Excel darker? luv2sing Excel Discussion (Misc queries) 1 July 22nd 06 04:36 PM


All times are GMT +1. The time now is 09:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"