mrwad99
asked on
Calculating value based on last occurence of a particular row!
Ah hello.
This might be a simple question, but I am a C++ programmer by trade and don't know much about Excel. So please bear with me :)
I am analysing a network packet trace and have extracted relevant data into the attached spreadsheet.
Long story short, I need to automatically calculate values in the "A-S" column. The pseudo-code for doing this is:
I haven't got a clue how to do this. Can someone please advise?
This might be a simple question, but I am a C++ programmer by trade and don't know much about Excel. So please bear with me :)
I am analysing a network packet trace and have extracted relevant data into the attached spreadsheet.
Long story short, I need to automatically calculate values in the "A-S" column. The pseudo-code for doing this is:
while we have not run out of rows
while value in first column is an S
remember the value in the VALUE column
go onto the next row
(At this point, the value in the first column for the current row is an 'A')
Subtract the remembered 'S' value from the current row's VALUE
Write this value into the A-S column for the current row
Go onto the next row
I haven't got a clue how to do this. Can someone please advise?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome!
ASKER
Hi, I have posted a follow up at https://www.experts-exchange.com/pendingQuestions/53861/Difference-between-specific-value-in-one-row-with-negative-value-and-specific-value-in-next-row-with-none-negative-value.html. I'd greatly appreciate it if you could help there too :)
ASKER