Hi, priya2208!
Perhaps you want to read the three green sticky posts at this forums main page so as to know the guidelines that will lead to know how this community operates (introducing yourself, posting files, netiquette rules, and so on).
About your question: would you please detail both workbooks and worksheets structure, indicating input ranges and data types and output ranges and expected results? Or better indeed, could you upload the sample files with sample data and explanation of required output? Thanks.
Regards!