1st Macro - Loop - Almost There?

northshoreroad

New Member
Joined
Jan 5, 2018
Messages
5
Hi all

Very new to VBA and hoping the community can help

I am trying to return the top 30 results from a number of days throughout the year.

There is only one header, at least 30 rows per day and the data has already been sorted. There will be no blank cells.

[TABLE="width: 262"]
<colgroup><col><col><col span="2"><col></colgroup><tbody>[TR]
[TD]Symbol[/TD]
[TD]Date[/TD]
[TD] Open [/TD]
[TD] Close [/TD]
[TD]Change[/TD]
[/TR]
[TR]
[TD]LEJU[/TD]
[TD]1/3/2017[/TD]
[TD] $ 4.70[/TD]
[TD] $ 4.20[/TD]
[TD]-10.64%[/TD]
[/TR]
[TR]
[TD]TWLO[/TD]
[TD]1/3/2017[/TD]
[TD] $ 29.25[/TD]
[TD] $ 26.50[/TD]
[TD]-9.40%[/TD]
[/TR]
[TR]
[TD]WAAS[/TD]
[TD]1/3/2017[/TD]
[TD] $ 24.15[/TD]
[TD] $ 22.06[/TD]
[TD]-8.65%[/TD]
[/TR]
[TR]
[TD]IO[/TD]
[TD]1/3/2017[/TD]
[TD] $ 6.10[/TD]
[TD] $ 5.60[/TD]
[TD]-8.20%[/TD]
[/TR]
[TR]
[TD]TSQ[/TD]
[TD]1/3/2017[/TD]
[TD] $ 10.46[/TD]
[TD] $ 9.63[/TD]
[TD]-7.93%[/TD]
[/TR]
[TR]
[TD]CNDT[/TD]
[TD]1/3/2017[/TD]
[TD] $ 14.84[/TD]
[TD] $ 13.72[/TD]
[TD]-7.55%[/TD]
[/TR]
[TR]
[TD]FN[/TD]
[TD]1/3/2017[/TD]
[TD] $ 41.05[/TD]
[TD] $ 37.98[/TD]
[TD]-7.48%[/TD]
[/TR]
[TR]
[TD]BCEI[/TD]
[TD]1/3/2017[/TD]
[TD] $ 1.05[/TD]
[TD] $ 0.98[/TD]
[TD]-6.67%[/TD]
[/TR]
[TR]
[TD]SGY[/TD]
[TD]1/3/2017[/TD]
[TD] $ 30.52[/TD]
[TD] $ 28.52[/TD]
[TD]-6.55%[/TD]
[/TR]
</tbody>[/TABLE]

The data above is for 1/3/17 until the end of the year. I would like to keep the first 30 rows, and then delete all rows until the next day (1/4/17 and so on). Once onto the next day keep/skip over the first 30 rows and then delete until the next day

Not sure how to put that into VBA language

From what I've read it would look something like this

Sub Keep_30()
I = 2 < this is where the data starts
I + 30 < skip over 30 rows
Delete until next I
End Sub

Thank you for any help you can provide
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Delete row 32 through the end?
Code:
Sub nsr()
  Range("A32", Cells(Rows.Count, Columns.Count)).ClearContents
End Sub
 
Last edited:
Upvote 0
Delete row 32 through the end?
Code:
Sub nsr()
  Range("A32", Cells(Rows.Count, Columns.Count)).ClearContents
End Sub

Hi shg.

Thank you for the quick reply

So my data starts on row 2. I would want to keep row 2 to row 31 and then delete all rows in between the next date. Once I get to the next date skip over 30 rows and then delete all rows after the first 30 until the next date.... and so on

I basically have hundreds of rows for 252 days of the year. I want to get it down to just 30 rows for those 252 days
 
Upvote 0
Post a workbook with an example that makes clear what you're trying to do.

I'm done for the evening, but someone will help you sort it out.
 
Upvote 0
Hey SHG

I don't currently have permission to attach a workbook.

Is there another way I could send? Or could the admins allow my account to post attachments?

I manually completed a couple of days in order to give you a sense of what I am trying to accomplish. Looks pretty bad on here but in Excel it should look good

The below shows the top 30 NYSE companies from January 1997 sorted first by date and then percentage change

Looking to keep the 30 largest losers for each day, and then delete all rows until the next day and then so on

[TABLE="width: 253"]
<colgroup><col><col><col span="2"><col></colgroup><tbody>[TR]
[TD]Symbol[/TD]
[TD]Date[/TD]
[TD] Open [/TD]
[TD] Close [/TD]
[TD] Change [/TD]
[/TR]
[TR]
[TD]GVA[/TD]
[TD]1/2/1997[/TD]
[TD] $ 8.89[/TD]
[TD] $ 8.06[/TD]
[TD]-9.34%[/TD]
[/TR]
[TR]
[TD]SIG[/TD]
[TD]1/2/1997[/TD]
[TD] $ 5.21[/TD]
[TD] $ 4.79[/TD]
[TD]-8.06%[/TD]
[/TR]
[TR]
[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 143.70[/TD]
[TD] $ 138.70[/TD]
[TD]-3.48%[/TD]
[/TR]
[TR]
[TD]MCK[/TD]
[TD]1/8/1997[/TD]
[TD] $ 26.19[/TD]
[TD] $ 25.28[/TD]
[TD]-3.47%[/TD]
[/TR]
[TR]
[TD]RS[/TD]
[TD]1/8/1997[/TD]
[TD] $ 7.63[/TD]
[TD] $ 7.37[/TD]
[TD]-3.47%[/TD]
[/TR]
[TR]
[TD]HNP[/TD]
[TD]1/8/1997[/TD]
[TD] $ 10.75[/TD]
[TD] $ 10.38[/TD]
[TD]-3.44%[/TD]
[/TR]
[TR]
[TD]CEL[/TD]
[TD]1/8/1997[/TD]
[TD] $ 73.75[/TD]
[TD] $ 71.25[/TD]
[TD]-3.39%[/TD]
[/TR]
[TR]
[TD]HMY[/TD]
[TD]1/8/1997[/TD]
[TD] $ 7.75[/TD]
[TD] $ 7.50[/TD]
[TD]-3.23%[/TD]
[/TR]
[TR]
[TD]HCC[/TD]
[TD]1/8/1997[/TD]
[TD] $ 18.33[/TD]
[TD] $ 17.75[/TD]
[TD]-3.16%[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
I have been monitoring this thread.

So if I understand each day may have a number of rows that is not always consistent. I believe you said More then 30.

If there was a consistent number we could delete rows 30 to 60 then 90 to 120 etc. but in your case I do not believe we can do that. Is that correct?
 
Upvote 0
I don't currently have permission to attach a workbook.

northshoreroad,

Welcome to the MrExcel forum.

Can we see what your raw data workbook/worksheets look like, and, can we see what the results (manually formatted by you) should look like?

You can post your workbook/worksheets to the following free site (sensitive data changed), mark the workbook for sharing, and, provide us with a link to your workbook:

https://dropbox.com
 
Last edited:
Upvote 0
Thank you for the reply

You are correct. Each day will always have more than 30 rows but there is no consistency in the amount of rows over 30. Between 150 up to multiple thousands

So in the data I posted above 1/2/1997 had almost 1,000 rows 1/3/1997 had almost 900
 
Upvote 0
I'm going to continue to monitor this thread. But your wanting to delete thousands and maybe even hundreds of thousand of rows and this is something I'm not able to do. Maybe Hiker or someone else here may have a answer for you.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,201
Members
453,022
Latest member
RobertV1609

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