F
flub
Hi,
I need a little help, as I'm trying to help my father with a
spreadsheet but have got stuck. I have 2 Columns, TransactionID and
TransactionCode.
5 T
5 AA
6 H
6 BB
7 AA
7 T
8 T
8 BB
What I want to be able to do it to create/compute a 3rd column based on
the other 2. Now this is where I am getting stuck. The Rule is that for
a TransactionCode of T or H this needs to be changed to either a "AA"
or BB depending on what the other value is for the same Transaction ID.
ie this would be the final output.
5 T AA
5 AA AA
6 H BB
6 BB BB
7 AA AA
7 T AA
8 T BB
8 BB BB
The sort of code I was think was something like this pseudo code.
if Cx = C(x-1) and Bx = "AA" then = "AA"
if Cx = C(x-1) and Bx = "BB" then = "BB"
if Cx = C(x+1) and Bx = "AA" then = "AA"
if Cx = C(x+1) and Bx = "BB" then = "BB"
But I have no Idea how to make these references to a Row PLUS/MINUS the
one I am currently on.
Would someone be so kind as to help me?
Many Many thanks in advance.
Mike
Thanks.
I need a little help, as I'm trying to help my father with a
spreadsheet but have got stuck. I have 2 Columns, TransactionID and
TransactionCode.
5 T
5 AA
6 H
6 BB
7 AA
7 T
8 T
8 BB
What I want to be able to do it to create/compute a 3rd column based on
the other 2. Now this is where I am getting stuck. The Rule is that for
a TransactionCode of T or H this needs to be changed to either a "AA"
or BB depending on what the other value is for the same Transaction ID.
ie this would be the final output.
5 T AA
5 AA AA
6 H BB
6 BB BB
7 AA AA
7 T AA
8 T BB
8 BB BB
The sort of code I was think was something like this pseudo code.
if Cx = C(x-1) and Bx = "AA" then = "AA"
if Cx = C(x-1) and Bx = "BB" then = "BB"
if Cx = C(x+1) and Bx = "AA" then = "AA"
if Cx = C(x+1) and Bx = "BB" then = "BB"
But I have no Idea how to make these references to a Row PLUS/MINUS the
one I am currently on.
Would someone be so kind as to help me?
Many Many thanks in advance.
Mike
Thanks.