Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default finding the last cell typed in


Iam using
ACTIVESHEET.CELLS.SPECIALCELLS(XLCELLTYPELASTCELL) .ACTIVATE
ACTIVECELL.ENTIREROW.CELLS(1, \"A\").SELECT
to get to the last cell used and then take it to column A. The problem

that I am having is, if I go down the worksheet and enter in text, and
then delete it. It will still go to where the text was that I
deleted.
So I guess what I am asking is if there is something that I could use
to find the last cell with text,instead of just the last cell used?


--
jj33002
------------------------------------------------------------------------
jj33002's Profile: http://www.excelforum.com/member.php...o&userid=30020
View this thread: http://www.excelforum.com/showthread...hreadid=497110

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default finding the last cell typed in


Hello JJ33002,

You can use this method to find the last cell in a column...

Dim Rng As Range
Set Rng = ActiveSheet.Cells(Rows.Count, "A")

Now use can easily return the address, select it, etc. because you hav
declared the last address as an object variable.

Addx = Rng.Address
Rng.Select
Rng.Offset(1, 0).Value = "100"

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=49711

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default finding the last cell typed in


Hey Leith,

I thank you for the help. I have to tell you that I am fairly new to
vba or programming in general. I can get the first part to work but i
can not get the last part of it to work.
Addx = Rng.Address
Rng.Select
Rng.Offset(1, 0).Value = "100"
Is there something that i am doing wrong.


--
jj33002
------------------------------------------------------------------------
jj33002's Profile: http://www.excelforum.com/member.php...o&userid=30020
View this thread: http://www.excelforum.com/showthread...hreadid=497110

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default finding the last cell typed in


jj33002 Wrote:
Hey Leith,

I thank you for the help. I have to tell you that I am fairly new to
vba or programming in general. I can get the first part to work but i
can not get the last part of it to work.
Addx = Rng.Address
Rng.Select
Rng.Offset(1, 0).Value = "100"
Is there something that i am doing wrong.
It keeps giving me an error "run-time error '424' object
required

I really need to start at the bottom of the page and go up to find the
last cell with text in it.


--
jj33002
------------------------------------------------------------------------
jj33002's Profile: http://www.excelforum.com/member.php...o&userid=30020
View this thread: http://www.excelforum.com/showthread...hreadid=497110

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default finding the last cell typed in


Hello Jj33002,

You left out this statement which assigns the the last row in column
"A" to the object variable "Rng".

Set Rng = ActiveSheet.Cells(Rows.Count, "A")

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=497110



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default finding the last cell typed in


Cool, thanks a lot for your help.


--
jj33002
------------------------------------------------------------------------
jj33002's Profile: http://www.excelforum.com/member.php...o&userid=30020
View this thread: http://www.excelforum.com/showthread...hreadid=497110

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
Auto populate this cell based on what's typed in this cell CrazyChic Excel Discussion (Misc queries) 2 April 10th 09 02:25 PM
If cell has any character typed in it cell curser moves to next c Form maker Excel Discussion (Misc queries) 1 December 18th 06 03:15 AM
Data entry - Copy contents of cell typed in one cell to another ce danie Excel Worksheet Functions 2 March 16th 06 06:51 PM
How do I get a - when a 0 is typed in a cell? patMO Excel Discussion (Misc queries) 5 July 20th 05 04:40 PM
how do I make a word typed in a cell go to a specific cell in anot Lmatarazzo Excel Discussion (Misc queries) 3 April 21st 05 04:29 AM


All times are GMT +1. The time now is 09:31 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"