Sample.png
I have a generic version of a spreadsheet I'm working on where I'm trying to automate some calculations but am getting stuck on this part.
Looking to find each case in columns C ('Value 2') and D ('Value 3') where the value changes from 0 to 1 (binary values only here). There will be multiple instances where 0 to 1 occurs and I need to evaluate each one.
From that I need to pull the data from the corresponding row for 'TIME' and 'Value 1'.
For 'Value 4' and 'Value 5' I need to pull the max value for the last full second before either 'Value 2' or 'Value 3' go from 0 to 1.
Manually I have done this countless times but do not know where to start in VBA for this.
INDEX/MATCH are functions I've used before to find correlating values but I'm struggling to make that connection based on the required 0 to 1 binary value change and then collecting the max value for 'Value 4' and 'Value 5' for the last second before 'Value 2' or 'Value 3' go from 0 to 1.
Any ideas?
Bookmarks