you get better help on your question if you add a small excel file, without confidential information.

please also add the expected result manualy in the file.