How to compare the 2 excel sheets

hello community,

i need a help , where in the situation , i have excel(.xlsx)2 sheets, i need to compare them, where i need to check if the colum (Actual state) is having 4 states, each of the state is having a threshold time limit.

i need to add a condition after comparing both sheets example: if (actual state(ACW), then its threshold time is 4: 00 minutes ) if the given threshold time in state is crossed in another sheet then we need to remove that particular entire row and add it in the resultant(3rd sheet) with headers. please refer the below image if you have any doubt. i need the solution as early as possible.

can u help me how to compare those 2 excel along a condition for each state in actual state (4 states) having respective time in threshold, if each state crosses the given threshold i need to remove the row.

Hi @Manoj_sreekanth, We can do that, But kindly explain it again clearly

1 Like

1.there are 2 sheets
2. we need only 2 columns from both the sheets (Actual state and time in state)
3. actual state is having 4 states(ACW, break, personal, System Issues)
4. for each of the actual states is having its own respective time in state values
for example: ACW in sheet 1 is having its time in state value= 4:00 minutes
if ACW value in sheet 2 is having its time in state value = 16 minutes\ any number of minutes greater than 4 minutes

then it is supposed to remove the entire row from that particular excel and add the same row into different sheet.

Hi @Manoj_sreekanth, Kindly ignore the previous one
Look at the Excel;
Excel.zip (2.5 KB)

1. Sheet 1 is a template
2. sheet 2 is a output
3. sheet 3 is a input sheet
Find the code below:
New Microsoft Excel Worksheet.xlsx (11.4 KB)

If it is helpful to you, Kindly mark it as solution. Thank you

looks like the document is invalid, could you please attach an image\ screenshot?

Hello @rohin_Kumar , could you please provide the screenshot of the code? I tried opening the document, but i am un able to open it.

1. if con: CurrentRow(â€śActual stateâ€ť).ToString=CurrentRow2(â€śActual stateâ€ť).ToString
2. if con: CDate(CurrentRow(â€śTime in stateâ€ť).ToString).ToString(â€śHH:mm:ssâ€ť) < CDate(CurrentRow2(â€śTime in stateâ€ť).ToString).ToString(â€śHH:mm:ssâ€ť)

Template:

input sheet:

Output sheet:

If it is helpful to you, kindly mark it as solution

hi @rohin_Kumar thank you for your support, but i dont see where youâ€™re trying write the output in sheet3. can u please send that image as well? sheet3 is the output right???

also in the inset/delete rows are u trying to delete them or insert them?

Hi @Manoj_sreekanth, we are not write it in different sheet, it just remove the row in same sheet, I am just showing the i/p and o/p in diff sheet

1. Sheet1 template
2. sheet2 output
sheet3 i am just showing, sheet 3 input sheet before process and sheet2 is after process
if you want to write it in diff sheet, read write it in diff sheet before starting the process and do the above process you can get the result
Thank you.
If it is helpful to you, kindly mark it as solution