ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   get last line number (https://www.excelbanter.com/excel-programming/369513-get-last-line-number.html)

Helmut

get last line number
 
I am using the following:
-----------------------------------------
Sheets("MESSER").Visible = True
Sheets("MESSER").Select
ActiveSheet.Unprotect

Range("ú_æ").Select
ActiveCell.Offset(1, 0).Range("A1").Select

Selection.End(xlDown).Select


Dim Message, Title, Default, MyValue

Message = "ä÷ìã îñôø ùåøä Ã*çøåðä" ' Set prompt.
Title = "" ' Set title.
Default = "F14:K???" ' Set default.

' Display message, title, and default value.
MyValue = InputBox(Message, Title, Default)

Range(MyValue).Select

Selection.Sort Key1:=ActiveCell, Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
Range("ú_æ").Select
ActiveCell.Offset(1, 0).Range("A1").Select

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

Sheets("MESSER").Visible = False

Sheets("START").Select
--------------------------------------------
Can the K??? last line number in column K be automatically detected by macro
without using the DIM statement and user interface....???
thanks
Helmut

naughtyboy[_2_]

get last line number
 

Hi friends.....
i have a problem in excel as suppose i have the folllowing excel sheet
A1 B1 C1 C2
C3 start date end date no of years
months days
9/18/2000 6/10/2001 0 8
23
11/5/2001 7/14/2002 0 8
9
4/6/2003 12/21/2003 0 8
15
total total
total
0 24
47
now i want to convert these days and months into years months and
days as answer should be 1 year 1 month and 17 days (because 24
months = 1year and 47 days = 1 month and 17 days)
i want a formula to calculate the answer.....
i will be evry thank ful to u.plz do help meeeeeeeeee..i m new heer i
dont know how to post a new thread if u dont know the answer so post
this as a new thread..thanks alottttttt


--
naughtyboy
------------------------------------------------------------------------
naughtyboy's Profile: http://www.excelforum.com/member.php...o&userid=37151
View this thread: http://www.excelforum.com/showthread...hreadid=568740


Mike Fogleman

get last line number
 
Try:
Default = "F14:K"& Cells(Rows.Count, "K").End(xlUp).Row

Mike F
"Helmut" wrote in message
...
I am using the following:
-----------------------------------------
Sheets("MESSER").Visible = True
Sheets("MESSER").Select
ActiveSheet.Unprotect

Range("ú_æ").Select
ActiveCell.Offset(1, 0).Range("A1").Select

Selection.End(xlDown).Select


Dim Message, Title, Default, MyValue

Message = "ä÷ìã îñôø ùåøä àçøåðä" ' Set prompt.
Title = "" ' Set title.
Default = "F14:K???" ' Set default.

' Display message, title, and default value.
MyValue = InputBox(Message, Title, Default)

Range(MyValue).Select

Selection.Sort Key1:=ActiveCell, Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
Range("ú_æ").Select
ActiveCell.Offset(1, 0).Range("A1").Select

ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True

Sheets("MESSER").Visible = False

Sheets("START").Select
--------------------------------------------
Can the K??? last line number in column K be automatically detected by
macro
without using the DIM statement and user interface....???
thanks
Helmut





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com