Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default last row value in a range

Hi

Have a userform in this form i have a textfield
i want to take the last row with value from a sheet into this field

regards alvin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default last row value in a range

I have done it

alvin


"Alvin Hansen" skrev:

Hi

Have a userform in this form i have a textfield
i want to take the last row with value from a sheet into this field

regards alvin

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default last row value in a range


Hello Alvin,

Here is an example. The data is in column "A" on "Sheet1". The TextBo
on the UserForm is TextBox1.


LastRow = Application.WorksheetFunction.CountA("A:A")

TextBox1.Text = Sheets("Sheet1").Cells(LastRow, 1)

__________________________________________________ _______________

The CountA function counts any type of information, including empt
text ("") but not including empty cells. If an argument is an array o
reference, empty cells within the array or reference are ignored. I
you do not need to count logical values, text, or error values, use th
COUNT function.

Also, when changing your column from "A" to whatever, Cells functio
reference is Cells(Row, Column).
__________________________________________________ _______________

Hope this helps,
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=34585

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 do I enter formula sum(range+range)*0.15 sumif(range=3) tkw Excel Discussion (Misc queries) 2 October 1st 09 09:17 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Range.Find returns cell outside of range when range set to single cell Frank Jones Excel Programming 12 June 10th 04 04:22 AM
how to? set my range= my UDF argument (range vs. value in range) [advanced?] Keith R[_3_] Excel Programming 2 August 11th 03 05:55 PM


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