Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Reference the last 13 rows of data


At the moment each month a new row of data is added to the bottom of a
"RawData" sheet, this sheet holds monthly data from 2003.
A Summary sheet details just the last 13 months of data. At the moment, each
month I have to delete the top month and copy and paste the "new" months
data on the bottom.
I believe I can set a formula that will always select the last 13 rows of
data from the "RawData" sheet, I regret I do not know how to go about this,
can anybody help please.

With thanks

Bob


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Reference the last 13 rows of data

The Summary sheet should show the latest 13 months records, so I would like
the row A13:J13 on the Summary sheet to lookup the last row of the RawData
sheet and to reflect that data. Then I want row A12:J12 to lookup the 2nd
from last row on the Raw Data sheet etc through to A1:J1 which would lookup
the 13th from bottom row on the RawData sheet and reflect it on the Summary
sheet..

I am sorry my initial post was unclear.

Bob


"Don Guillett" wrote in message
...
And what would you like this formula to do?

--
Don Guillett
SalesAid Software

"Robert Gillard" wrote in message
.uk...

At the moment each month a new row of data is added to the bottom of a
"RawData" sheet, this sheet holds monthly data from 2003.
A Summary sheet details just the last 13 months of data. At the moment,

each
month I have to delete the top month and copy and paste the "new" months
data on the bottom.
I believe I can set a formula that will always select the last 13 rows of
data from the "RawData" sheet, I regret I do not know how to go about

this,
can anybody help please.

With thanks

Bob






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Reference the last 13 rows of data

Hi Robert

Try this example for the activesheet

Copy both in a formula and run test
There is no error checking if there are less then 13 rows

Sub test()
range(Cells(LastRow(ActiveSheet) - 12, 1), Cells(LastRow(ActiveSheet), 1)).EntireRow.Select
End Sub

Function LastRow(sh As Worksheet)
On Error Resume Next
LastRow = sh.Cells.Find(What:="*", _
after:=sh.range("A1"), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
End Function


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Robert Gillard" wrote in message .uk...

At the moment each month a new row of data is added to the bottom of a "RawData" sheet, this sheet holds monthly data from 2003.
A Summary sheet details just the last 13 months of data. At the moment, each month I have to delete the top month and copy and
paste the "new" months data on the bottom.
I believe I can set a formula that will always select the last 13 rows of data from the "RawData" sheet, I regret I do not know
how to go about this, can anybody help please.

With thanks

Bob



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Reference the last 13 rows of data

Copy both in a formula and run test

Copy both in a module and run test


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Ron de Bruin" wrote in message ...
Hi Robert

Try this example for the activesheet

Copy both in a formula and run test
There is no error checking if there are less then 13 rows

Sub test()
range(Cells(LastRow(ActiveSheet) - 12, 1), Cells(LastRow(ActiveSheet), 1)).EntireRow.Select
End Sub

Function LastRow(sh As Worksheet)
On Error Resume Next
LastRow = sh.Cells.Find(What:="*", _
after:=sh.range("A1"), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
End Function


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Robert Gillard" wrote in message .uk...

At the moment each month a new row of data is added to the bottom of a "RawData" sheet, this sheet holds monthly data from 2003.
A Summary sheet details just the last 13 months of data. At the moment, each month I have to delete the top month and copy and
paste the "new" months data on the bottom.
I believe I can set a formula that will always select the last 13 rows of data from the "RawData" sheet, I regret I do not know
how to go about this, can anybody help please.

With thanks

Bob







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
Losing rows that reference data from another worsheet mhmyers40241 Excel Worksheet Functions 1 February 25th 10 11:18 PM
reference every 19 rows Scottyb97 Excel Worksheet Functions 8 July 1st 08 11:01 PM
Rows to Columns on reference excelmad Excel Worksheet Functions 4 January 15th 07 04:54 PM
after selecting 50 rows of a column i can't reference the cells in the rows Bob Salzer New Users to Excel 2 July 21st 06 10:29 PM
How do I reference multiple rows Awetronics Excel Worksheet Functions 1 November 4th 04 12:37 AM


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