Cell’s value to be MATCHED with the last digit of another cell

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,213
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
Cell D3 generates values
F2 also generates value but is of MAXIMUM 1 digit.
I need
G3=1 IF D3’s value ENDS WITH value of F2 else 0

How to accomplish?
Thanks in advance.
Book2.xlsx
DEFG
2E
342000CE1
442000CC0
541E1
6E1
7ABCD0
Sheet5
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
That's ok. But will the formula of Sufiyan97 work for my range OR more polished/versatile formula is required?

It will work, just change it to correct cell references.
 
Upvote 0
Another formula in column I

Book4
CDEFGHIJ
1
2E
342000CE111
442000CC000
541E111
6E111
7ABCD000
8
9
Sheet1
Cell Formulas
RangeFormula
H3:H7H3=N(RIGHT(D3)=$F$2)
I3:I7I3=(--(RIGHT(D3)=$F$2))
 
Upvote 0
Solution
Another formula in column I

Book4
CDEFGHIJ
1
2E
342000CE111
442000CC000
541E111
6E111
7ABCD000
8
9
Sheet1
Cell Formulas
RangeFormula
H3:H7H3=N(RIGHT(D3)=$F$2)
I3:I7I3=(--(RIGHT(D3)=$F$2))
Formula of column I works. 1 query, there is neither 1 nor 0 in the formula but still it populates 1 or 0 as required, how?
 
Upvote 0
Formula of column I works.
So does column H formula have any issue?

1 query, there is neither 1 nor 0 in the formula but still it populates 1 or 0 as required, how?

It is becuase this part of formula RIGHT(D3)=$F$2 will return TRUE and FALSE and then "--" will convert TRUE into 1 and FALSE into 0


you can look here:



While in column H formula N() will convert it TRUE into 1 and so on.
 
Upvote 0

Forum statistics

Threads
1,215,248
Messages
6,123,869
Members
449,130
Latest member
lolasmith

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