You seem to be a smart guy, you’ve attended courses such as DeepLearning.AI, Building AI Powered Chatbots without Programming - IBM (as per your LinkedIn profile) and it would be kind of a shame not to take a look over the UiPath Accademy courses:
Your issue could be easily solved by using only 4 basic UiPath activities:
@Yudhisteer_Chintaram : I’ve added the solution, please mark the thread closed with a solution. I took your input sheet and cleaned it up. @Others: Please do let me know if you have any inputs / comments on the solution provided, its always better to learn more.