1

I have excel that col A and col B like below:

  A       B   
 KIWI   KIWI
 APPLE  APPLE
 ORANGE  BANANA

I need to compare the contents in col A and col B and if they matches write match/not match in col C like below.

  A         B        C
 KIWI    KIWI     Matched
 APPLE   APPLE    Matched
 ORANGE  BANANA   Not Matched

I am using xlwt to write excel.I can use xlrd to read and xlwt to write again.But to do this I need to open the same sheet twice.

please help me is there any better way to do this .

Cheney
  • 960
  • 8
  • 23

1 Answers1

0

Have you tried using an if compare formula in column C instead =if(a1=b1,matched, not matched)?

  • pls share an example to better explain what `IF` formula you are trying to mention here; because =if(a1... also has an IF formula. – shripal mehta Nov 28 '22 at 06:13