If "xx" or "yy" then

Solved
Ludivine -  
 Ludivine -

Hello everyone!

Today I have the following formula:

 =IF(MID(_Data[@[Label du MFD]],5,10)="MJ123456789","WM",RIGHT(_Data[@[Code présentation]],2))

It works and does the following:

In the "_Data" tab, column "Label du MFD", if from character #5 and for 10 characters the cell contains "MJ123456789" then indicate "WM".
Otherwise return "a bit" of the value contained in the "_Data" tab, column "code présentation".

I want to evolve the formula in order to add a condition to return "WM": (the desired modification is indicated in bold)

In the "_Data" tab, column "Label du MFD", if from character #5 and for 10 characters contains "MJ123456789" OR contains "AM12345678" then indicate "WM".

Otherwise, the same punishment as before.

However, I cannot manage to combine the IF, MID, and OR functions; everything results in an error!

Is there a kind soul to help me?

Thank you very much in advance!!

2 réponses

jee pee Posted messages 31926 Registration date   Status Modérateur Last intervention   9 951
 

Hello,

the syntax is =IF(OR(condition1,condition2),TRUE,FALSE)

so something like

 =IF(OR(MID(_Data[@[MFD Label]];5;10)="MJ123456789",MID(_Data[@[MFD Label]];5;10)="AM12345678"),"WM",RIGHT(_Data[@[Presentation Code]];2))

0
Ludivine
 

Great, it works, thank you!

I hadn't tried to duplicate the STXT part!

Thank you very much Jee pee!

0