I'm hoping someone could kindly help me figure out a formula to return the result I want. I have attached by input data and output data so you can see what I'm trying to achieve. I believe it can be done with a formula tool but it might not be as simple as that! I have a string of text in 'SESSION ID' and some of my data has a duplicate 'SESSION ID' BUT it has an underscore after it and some other unique numbers. First of all I'm trying to identify the data where the session ID's match at the start (so if one session id has an underscore in, want the two to match BEFORE the underscore) and if that is a match, then return then the SCSFEE, INVFEE and Comment to the session ID that has the underscore in. So it basically matched these columns with the session ID without the underscore and is the same numbers for the first characters before the underscore. I didn't want to put the amount of characters to match as they can vary sometimes. So as example, session ID have 8 characters at the start say 12345678 and the other session ID is 12345678_202312356 BUT then another row in my data could be 1234 and other session id is 1234_2023123 so I couldn't say match the first 4 characters say as the other example has 8 characters at the start.
I hope that makes sense and I know might sound a little confusing but hopefully the input and output I have attached will make it clear. A massive thank you in advance for your help!