IF and RIGHT Formula?

Dazzawm

Well-known Member
Joined
Jan 24, 2011
Messages
3,748
Office Version
  1. 365
Platform
  1. Windows
I think I need an IF & RIGHT formula please. I have like below where I need the formula to say if the last 2 letters are LH or RH then the number 1, if there is nothing then the number 2. Thanks

Suspension Arm-LH
Suspension Arm-RH
Ball Joint

<colgroup><col></colgroup><tbody>
</tbody>
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Thanks it still resulted with number 1 when there was no LH/RH on the end?


Excel 2010
AB
1FAI Suspension Arm-LH1
2FAI Suspension Arm-RH1
3FAI Ball Joint1
Sheet2
Cell Formulas
RangeFormula
B1=IF(OR(RIGHT(A1,2)="LH",RIGHT(A1,2)="RH"),1,2)
B2=IF(OR(RIGHT(A2,2)="LH",RIGHT(A2,2)="RH"),1,2)
B3=IF(OR(RIGHT(A3,2)="LH",RIGHT(A3,2)="RH"),1,2)
 
Last edited:
Upvote 0
It worked for me on my test. If the cell (A1) was blank or didn't end in LH or RH I received a 2.

What cell are you comparing it too and what is currently in that cell?
 
Upvote 0
Evaluate the formula, on the Formulas tab under formula auditing, Evaluate Formula. This should show you what is giving you to false TRUE.
 
Last edited:
Upvote 0
Thanks Scott yours does not work either. If you look at A3 in #3 it does not have LH/RH at the end so should get a 2. It gives a 1?
 
Upvote 0

Forum statistics

Threads
1,215,126
Messages
6,123,200
Members
449,090
Latest member
bes000

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