If(Or(Rght(.......) formula won't work

mab1284

New Member
Joined
Mar 22, 2010
Messages
23
Why won't the following formula work:

=IF(OR(RIGHT(B1,3)="601","610","615"),"MfrgPart","VendorPart")

My part #s are ABCD101, DCEF601, the last three digits are always the reference to mfrg part or vendor part.

Any help would be appreciated.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
=IF(OR(RIGHT(B1,3)={"601","610","615"}),"MfrgPart","VendorPart")
 
Upvote 0
Try

=IF(OR(RIGHT(B1,3)="601",RIGHT(B1,3)="610",RIGHT(B1,3)="615"),"MfrgPart","VendorPart")
 
Upvote 0
Why won't the following formula work:

=IF(OR(RIGHT(B1,3)="601","610","615"),"MfrgPart","VendorPart")

My part #s are ABCD101, DCEF601, the last three digits are always the reference to mfrg part or vendor part.

Any help would be appreciated.

Try...

=IF(ISNUMBER(MATCH(RIGHT(B1,3)+0,{601,610,615},0)),"MfrgPart","VendorPart")
 
Upvote 0
=IF(OR(RIGHT(B1,3)={"601","610","615"}),"MfrgPart","VendorPart")


Thank you so much. Just another question because I can't find the answer in the Excel reference book I have, what do the {} mean? The formula worked but for future I would like to know what the { } brackets do?
 
Upvote 0
Try...

=IF(ISNUMBER(MATCH(RIGHT(B1,3)+0,{601,610,615},0)),"MfrgPart","VendorPart")

Thank you much. I see your formula also includes the { } brackets as well as the ( ). Don't see any reference to { } in my Excel book so maybe I need to get a more advanced book.
 
Upvote 0
Thank you much. I see your formula also includes the { } brackets as well as the ( ). Don't see any reference to { } in my Excel book so maybe I need to get a more advanced book.

{601,610,615}

is an array constant. It would be identical to a range housing these values in cells of their own, say, X2:X4, with X2 = 601, X3 = 610, and X4 = 615.

We can now invoke equivalently:

=IF(ISNUMBER(MATCH(RIGHT(B1,3)+0,$X$2:$X$4,0)),"MfrgPart","VendorPart")
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,317
Members
452,905
Latest member
deadwings

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