Compare two columns and paste it in third column code not working

I have two columns with below data. DATA_TYPE DATA_TYPE Result VARCHAR2 VARCHAR2 1 NUMBER NUMBER 1 VARCHAR2 NUMBER 1

I am using below code to do the comparision for the two columns but the result should be 1,1,0 but the result I am getting is 1,1,1. Check the below code and tell me what’s my mistake. For j = 2 To Workbooks(“Compare_Sheets”).Worksheets(“Temp3”).Range(“A” & Rows.Count).End(xlUp).Row

If Workbooks("Compare_Sheets").Worksheets("Temp3").Cells(j, 2).Value = Workbooks("Compare_Sheets").Worksheets("Temp3").Cells(j, 11).Value Then    Workbooks("Compare_Sheets").Worksheets("Temp3").Cells(j, 20).Value = "1" Else    Workbooks("Compare_Sheets").Worksheets("Temp3").Cells(j, 20).Value = "0" End If 

Next J

Thanks in advance