I am looking to add new rows on some data based on the the rows already in the data. It has a column with either reversible or not reversible. If that column is reversible then I need to create a new row with the same data but the origins and destination fields reversed in the new row.
So in the data below row 1 is reversible so I need to add a new row to the data but with origin code replaced by the dest code and the same for the origin desc, dest code and dest desc, but the route code and desc stay the same.Row 2 is not reversible so no new row is added
| Origin Code | Origin Desc | Dest Code | Dest Desc | Route Code | Route desc | Reversible/Not reversible |
1 | Q123 | PLACE1 | Q456 | PLACE2 | Q234 | ROUTE1 | Reversible |
2 | Q124 | PLACE3 | Q457 | PLACE4 | Q236 | ROUTE2 | Not Reversible |
NEW ROW | | | | | | |
3 | Q456 | PLACE2 | Q123 | PLACE1 | Q234 | ROUTE1 | Reversible |