Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Read Last Inputted Value?


Lets say I have a range of cells:
Value1
Value2
Value3
Value4



How could I get Excel to (worksheet function, or vb macro) to read a
Range of cells, and simply tell me what is the last value in the list?
So in this case it would return Value4.

However, if I had
Value1
Value2

it would return Value2. I know I could probably write a vb macro to
look at each cell in a specified range, call ISBLANK(Cell) ... Soon as
I get TRUE, I know the value I was looking for was the last ISBLANK I
called. But, is there an easier way? THanks,

Yin99

  #2   Report Post  
Posted to microsoft.public.excel.programming
jtp jtp is offline
external usenet poster
 
Posts: 1
Default Read Last Inputted Value?


Sub FindLastCell()
Dim cell as Range

set cell = Activesheet.Range("A1").end(xldown)

end sub


--
jtp
------------------------------------------------------------------------
jtp's Profile: http://www.excelforum.com/member.php...o&userid=21132
View this thread: http://www.excelforum.com/showthread...hreadid=562712

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Read Last Inputted Value?

If the values are in Column A starting in the first row

Sub lastValue()

Range("A1").Select
MsgBox Selection.End(xlDown).Value

End Sub

Yin99 wrote:
Lets say I have a range of cells:
Value1
Value2
Value3
Value4

How could I get Excel to (worksheet function, or vb macro) to read a
Range of cells, and simply tell me what is the last value in the list?
So in this case it would return Value4.

However, if I had
Value1
Value2

it would return Value2. I know I could probably write a vb macro to
look at each cell in a specified range, call ISBLANK(Cell) ... Soon as
I get TRUE, I know the value I was looking for was the last ISBLANK I
called. But, is there an easier way? THanks,

Yin99


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200607/1
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
Data Changes itself after I have inputted. Funky Excel Discussion (Misc queries) 5 September 27th 07 01:25 PM
Getting Last Value that inputted instereo911 via OfficeKB.com Excel Discussion (Misc queries) 0 April 25th 07 07:51 PM
Calculating from last inputted cell Petermac New Users to Excel 3 May 31st 06 02:11 PM
Due date changes when new value is inputted in a different column John Excel Programming 3 November 11th 05 05:53 PM
calculating from last inputted cell DAShields Excel Discussion (Misc queries) 5 March 3rd 05 08:01 PM


All times are GMT +1. The time now is 06:03 PM.

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

About Us

"It's about Microsoft Excel"