Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting the last line of data in a data sheet.
I have a running list of data in a worksheet2 where column B contains the date of the data. What I would like is a macro that will find the last line of data in worksheet2, get the date in that last line column B and plant it on worksheet1 A1. Thanks very much, Ken -- sungen99 ------------------------------------------------------------------------ sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144 View this thread: http://www.excelforum.com/showthread...hreadid=513658 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting the last line of data in a data sheet.
Hi Ken,
Try: '============= Public Sub Tester() Dim WB As Workbook Dim SH As Worksheet Dim rng As range Set WB = ActiveWorkbook '<<==== CHANGE Set SH = WB.Sheets("Sheet2") Set rng = SH.Cells(Rows.Count, "B").End(xlUp) rng.Copy Destination:=WB.Sheets("Sheet1").range("A1") End Sub '<<============= --- Regards, Norman "sungen99" wrote in message ... I have a running list of data in a worksheet2 where column B contains the date of the data. What I would like is a macro that will find the last line of data in worksheet2, get the date in that last line column B and plant it on worksheet1 A1. Thanks very much, Ken -- sungen99 ------------------------------------------------------------------------ sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144 View this thread: http://www.excelforum.com/showthread...hreadid=513658 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Moving a line chart data point revises data table value in Excel ' | Charts and Charting in Excel | |||
Copy data into new line on seperate sheet? | Excel Discussion (Misc queries) | |||
Formatting data series - line between certain data points only | Charts and Charting in Excel | |||
Adding an Average line (from data sheet) to a chart automatically. | Charts and Charting in Excel | |||
Entering 1 line of data values that will show up in a second Sheet? | Excel Programming |