Extracting and recording data and inserting into new cells

jetpack

Board Regular
Joined
Nov 4, 2010
Messages
81
I have 2 problems that I can not solve. I don't know if a solution to either of them is possible in excel.

1. From a large spreadsheet/database with time and price information I need to extract the data from every 15th row and insert it into a new spreadsheet in chronological order.

2. Is there any way to record live streaming data every nth second or minute to a new workbook or sheet?

If anyone can help it will be much appreciated.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
For the first part, see if you can adapt this

Dim c As Range, rng
Dim i As Long
Dim LASTROW As Long
Dim val1 As String
Dim LASTROW2 As Long

LASTROW = Cells(Rows.Count, 1).End(xlUp).Row

Set rng = Range("a1:a" & LASTROW)
For Each c In rng
If c.Row Mod 15 = 0 Then
val1 = c.Value
Sheets("sheet2").Activate
LASTROW2 = Cells(Rows.Count, 1).End(xlUp).Row
Range("a" & LASTROW2).Offset(1, 0) = val1
Sheets("sheet1").Activate
End If
Next c
 
Upvote 0
Thank you very much for your reply to my problem.

I ran the code and received this error.
Compile error. Invalid outside procedure.

LASTROW = Cells(Rows.COUNT, 1).End(xlUp).Row
with the xlUp being underlined.

Not sure what might be the problem. Is this a user defined procedure that I need the code for?

Thanks
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top