Hello,
once again me with a specific problem that I am not able to solve yet. Not sure if this can be tackled easily, I searched the net for some solutions and tried myself using my limited knowledge, but no luck so far. I will appreciate anyone's helps on this.
I have a table with A-M columns that receives new rows every day (tables added at the end). New rows contain only data in columns A-M, old rows contain also data in columns N-P.
I need to automatically add cells in columns N-P to a new row if value in M exists in any of the previous rows. Those values should be the same as the first entry found in the rows above.
If such entry is not found then cells N,O,P should be inserted with 'n/a'
In example
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A1
[/TD]
[TD]A2[/TD]
[TD]A3[/TD]
[TD]A4[/TD]
[TD]A5[/TD]
[TD]A6[/TD]
[TD]A7[/TD]
[TD]A8[/TD]
[TD]A9[/TD]
[TD]A10[/TD]
[TD]A11
[/TD]
[TD]A12
[/TD]
[TD]A13
[/TD]
[TD]A131
[/TD]
[TD]A242
[/TD]
[TD]A353
[/TD]
[/TR]
[TR]
[TD]B2
[/TD]
[TD]B2
[/TD]
[TD]B3
[/TD]
[TD]B4
[/TD]
[TD]B5
[/TD]
[TD]B6
[/TD]
[TD]B7
[/TD]
[TD]B8
[/TD]
[TD]B9
[/TD]
[TD]B10
[/TD]
[TD]B11
[/TD]
[TD]B12
[/TD]
[TD]B13
[/TD]
[TD]XXX
[/TD]
[TD]YYY
[/TD]
[TD]TTT
[/TD]
[/TR]
[TR]
[TD]C3
[/TD]
[TD]C2
[/TD]
[TD]C3
[/TD]
[TD]C4
[/TD]
[TD]C5
[/TD]
[TD]C6
[/TD]
[TD]C7
[/TD]
[TD]C8
[/TD]
[TD]C9
[/TD]
[TD]C10
[/TD]
[TD]C11
[/TD]
[TD]C12
[/TD]
[TD]A13
[/TD]
[TD]A121
[/TD]
[TD]A232
[/TD]
[TD]A343
[/TD]
[/TR]
[TR]
[TD]D4
[/TD]
[TD]D2
[/TD]
[TD]D3
[/TD]
[TD]D4
[/TD]
[TD]D5
[/TD]
[TD]D6
[/TD]
[TD]D7
[/TD]
[TD]D8
[/TD]
[TD]D9
[/TD]
[T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TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]E13
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10e
[/TD]
[TD]ds
[/TD]
[TD]gr
[/TD]
[TD]ht
[/TD]
[TD]jz
[/TD]
[TD]ku
[/TD]
[TD]vd
[/TD]
[TD]gr
[/TD]
[TD]ht
[/TD]
[TD]sw
[/TD]
[TD]ce
[/TD]
[TD]ge
[/TD]
[TD]D13
[/TD]
[TD]A131
[/TD]
[TD]YYY
[/TD]
[TD]EEE
[/TD]
[/TR]
</tbody>[/TABLE]
First five rows are the old records - the cells N to P are filled up already or not filled up.
Second five rows are added to the sheet, depending on the value in column M the cells to the right (N,O,P) should be filled, based on the first finding above with the same value in column M.
That results in:
Row 6 has A13 in the column M. First cell with same value above the current(new) row is in 3rd row - cells N,O,P from third row therefore get copied and inserted into row 6
Row 7 has B13 in the column M. First cell with same value above the current(new) row is in 2rd row - cells N,O,P from third row therefore get copied and inserted into row 7
Row 8 has C13 in the column M. There is not a cell with this value in the rows above, so 'n/a' is inserted in the cells N,O,P
Row 9 has E13 in the column M. First cell with same value above the current(new) row is in 5th row - it contains nothing in cells N,O,P, therefore row 9 shall also contain nothing in cells N,O,P
Row 10 has D13 in the column M. First cell with same value above the current(new) row is in 4th row - cells N,O,P from 4th row therefore get copied and inserted into row 10
I see that the problem may be how to recognize the old rows - if that is so I can replace blank N,O,P cells with any string to mark old rows as the ones where N,O,P contains something.
Has anyone experience with such methods of filling up cells?
many thanks in advance for anyones help.
once again me with a specific problem that I am not able to solve yet. Not sure if this can be tackled easily, I searched the net for some solutions and tried myself using my limited knowledge, but no luck so far. I will appreciate anyone's helps on this.
I have a table with A-M columns that receives new rows every day (tables added at the end). New rows contain only data in columns A-M, old rows contain also data in columns N-P.
I need to automatically add cells in columns N-P to a new row if value in M exists in any of the previous rows. Those values should be the same as the first entry found in the rows above.
If such entry is not found then cells N,O,P should be inserted with 'n/a'
In example
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ce
[/TD]
[TD]ge
[/TD]
[TD]D13
[/TD]
[TD]A131
[/TD]
[TD]YYY
[/TD]
[TD]EEE
[/TD]
[/TR]
</tbody>[/TABLE]
First five rows are the old records - the cells N to P are filled up already or not filled up.
Second five rows are added to the sheet, depending on the value in column M the cells to the right (N,O,P) should be filled, based on the first finding above with the same value in column M.
That results in:
Row 6 has A13 in the column M. First cell with same value above the current(new) row is in 3rd row - cells N,O,P from third row therefore get copied and inserted into row 6
Row 7 has B13 in the column M. First cell with same value above the current(new) row is in 2rd row - cells N,O,P from third row therefore get copied and inserted into row 7
Row 8 has C13 in the column M. There is not a cell with this value in the rows above, so 'n/a' is inserted in the cells N,O,P
Row 9 has E13 in the column M. First cell with same value above the current(new) row is in 5th row - it contains nothing in cells N,O,P, therefore row 9 shall also contain nothing in cells N,O,P
Row 10 has D13 in the column M. First cell with same value above the current(new) row is in 4th row - cells N,O,P from 4th row therefore get copied and inserted into row 10
I see that the problem may be how to recognize the old rows - if that is so I can replace blank N,O,P cells with any string to mark old rows as the ones where N,O,P contains something.
Has anyone experience with such methods of filling up cells?
many thanks in advance for anyones help.