Can I Summarise Dataset with VBA?

Status
Not open for further replies.

Peter1986

New Member
Joined
Jan 22, 2020
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a large dataset of two columns. The first column is a count 1,2,3,4 etc and the second has a range of variable integers. There are hundreds of thousands of data entries in my complete dataset.

Please can I get advise as to whether it is possible to summarise this dataset with VBA.

I want to create an output data table which counts the amount of 0 entries in a row or positive (>0) entries in a row, give the position of the first and last of those entries, give the max of those entries, then once the value changes back to 0 or >0, start counting again. I have included a simplified image of the dataset and required output table.

Example_Summary_Table.JPG


In this example, values 1-3 are zero so this is entered in the first row of the output table. The next four entries are >0 so this is entered in the second row, also stating that the max of those entries is '5'. The next three values are 0, etc.

Any advice on this problem would be very much appreciated.

Thank you in advance

Peter
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Duplicate Refine VBA code to summarise by max values

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,213,544
Messages
6,114,249
Members
448,556
Latest member
peterhess2002

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