Possible to use VBA to summarise a data table in order of data entry?

Status
Not open for further replies.

Peter1986

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

Please can I get advice on whether it is possible to use VBA to create a summary table from a 2 column dataset as follows:
  • The input data is a simple list of integer 'values' between 1 and 15.
  • The output data should count the number of zero values in a row or non-zero values in a row, give the start and end point of those values, the max of those values then once the value changes (to zero or back to non-zero), start counting again. Please see the image below.
  • Example_Summary_Table.JPG

  • So in the example above, the first three values are '0', so the first entry in the output states that the value of 0 occurs between the first and third entry, the fourth to seventh value are non zero and the max is 5, the 8th to 10th values are 0, etc,
I am a 3rd year engineering student and have a large dataset (up to 100,000 rows) to sort, and hence any advice on whether this is likely to be possible would be greatly appreciated.

Many Thanks in advance

Peter
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
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,214,950
Messages
6,122,436
Members
449,083
Latest member
Ava19

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