Link to home
Start Free TrialLog in
Avatar of mrwad99
mrwad99Flag for United Kingdom of Great Britain and Northern Ireland

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:

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

Open in new window


I haven't got a clue how to do this.  Can someone please advise?
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mrwad99

ASKER

Thank you very much!
You're welcome!