Forum Discussion
Calculate battery power used
Help please.
I have four columns of data with 50k lines. Col1 has an equipment identifier (23 units), cols2 & 3 contain datetime codes for equipment login/logout and col4 holds battery level percentages. The table is sorted by Equipment ID then chronologically top to bottom by login datetime. The figures in col4 descend from between 90% & 100% to “around” 20%, with multiple login/logout events between, at which point a recharge/change event occurs and the next cell (below) will be back at between 90% & 100%.
Need to determine the time period (hrs) and actual percentage used between battery change/charge events.
Can this be achieved with the use of a formula or would a macro be required?
This was a fascinating project because MAP was bonking out (I7 processor, 32 GB RAM) with this large data set. I had used MAP to identify the rows where the calculations would run and to help with the subtraction. MAP/INDEX/ROW seems to have limits. I did not try this with insider functions.
I went with simpler dynamic arrays. Ultimately, this data set has to be paired down to perform the calculations.
12 Replies
- Patrick2788Silver ContributorThis is do-able with a formula. Do you happen to have a sample workbook?
- IanTJamesCopper Contributor
I do have a sample sheet but I don't know how to attach it here.
- Patrick2788Silver Contributor