If (2 numbers in cell are identical) print "1" or "0" in cell "x"

Alnicoll

New Member
Joined
Sep 8, 2014
Messages
3
I can't seem to find an answer to this can anyone advise me please?
I want excel to recognize if column A row 1 has identical numbers (or text), print "1" in column B row 1. Else, print "0".


For instance
A _____________B
3 31
5 90

<tbody>
</tbody>
Thanks
 
Last edited:

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
I can't seem to find an answer to this can anyone advise me please?
I want excel to recognize if column A row 1 has identical numbers (or text), print "1" in column B row 1. Else, print "0".


For instance
A _____________B
3 31
5 90

<tbody>
</tbody>
Thanks

Try =IF(LEFT(A1,1)=RIGHT(A1,1),1,0)
 
Upvote 0
If you only have two single digits in each of the cells...

=0+(LEFT(A1)=RIGHT(A1))

otherwise...

=0+(LEFT(A1,FIND(" ",A1)-1)=MID(A1,FIND(" ",A1)+1,99))
 
Upvote 0

Forum statistics

Threads
1,214,817
Messages
6,121,717
Members
449,050
Latest member
MiguekHeka

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top