I have a table with multiple events (P1, P2, N1, early P3, P3) listed in one column, ROI. There are several adjacent columns with latencies that have the same events in their titles. I would like to create a new column (Latencies) with the latencies in the adjacent columns extracted and matched the events in the ROI column. For example if the event under ROI is P1 then under the new column, Latencies, the data in the same row under P1_Max_Lat would be copied. I attached a sample table.