SOLVED
Home

OR In an IF function

Highlighted
Judy Tran
New Contributor

OR In an IF function

Hi,

I have two columns containing serial numbers.

I need a function which states that if the first column ends in either 616 or 796, take that column’s serial number and if it ends in neither, take the second column’s serial number.

Is there a function I can use to do this?
3 Replies
Solution

Re: OR In an IF function

Hi Judy

 

You'll need a formula to do what you are proposing.

 

I've drafted this formula, see if it does the job for you?

 

=IF(OR(RIGHT(A2,3)="616",RIGHT(A2,3)="796"),A2,B2)

 

A2 represents the first value in your First column.

B2 represents the second value in your Second column.

 

Replace the cell references with your desired ones.

 

I've also attached a same of the worksheet I've made for you to see it in action.

 

Let me know if this did the trick?

 

Cheers

Damien

Re: OR In an IF function

Yes, that’s perfect! Thanks so much for your help!

Re: OR In an IF function

Happy to help!

All the best
Damien
Related Conversations
OCM encountered an error. Won't start.
Brett Stacey in Outlook Customer Manager on
3 Replies
Add 5 if a cell contains text "yes"
Titchard Family in Formulas and Functions on
6 Replies
IFERROR - HLOOKUP- IF formula error
data24365 in Formulas and Functions on
14 Replies
Cost estimator for small scale catering
Louisa Dira in Excel on
12 Replies