6 Replies Latest reply: Oct 20, 2016 6:46 AM by Sunny Talwar

# How to use Pick and Match for the below

Hi gysbert wassenaar ,

Can anyone formulate the below with pick and match function .

=if(PG='M'

or PG='P others'

or PG='NE'

or PG='PE'

or PG='HC'

or PG='EC'

or PG='FOOD'

or PG='BIO'

or PG='DIS

or PG='SB'

or PG='Ca'

or PG='PH

or PG='PRO'

or PG='SEYO',dual('Others',26),

if(PG='CP',dual('CPS',12),

if(PG='PC',dual('PCS',10),

if(PG='VC',dual('VCS',11),

if(PG='ALL',null(),PG)))))

• ###### Re: How to use Pick and Match for the below

May be like this if this is the complete list of PG listed out in all the if statements:

Pick(Match(PG, 'CP', 'PC', 'VC', 'ALL') + 1, Dual('Others', 26), Dual('CPS', 12), Dual('PCS', 10), Dual('VCS', 11), Null())

• ###### Re: How to use Pick and Match for the below

Or this:

If(Match(PC, 'M', 'P others', 'NE', 'PE', 'HC', 'EC', 'FOOD', 'BIO', 'DIS', 'SB', 'Ca', 'PH', 'PRO', 'SEYO'), Dual(Others', 26),

If(Match(PG, 'CP', 'PC', 'VC', 'ALL'),

Pick(Match(PG, 'CP', 'PC', 'VC', 'ALL'), Dual('CPS', 12), Dual('PCS', 10), Dual('VCS', 11), Null()), PG))

• ###### Re: How to use Pick and Match for the below

If(Match(PC, 'M', 'P others', 'NE', 'PE', 'HC', 'EC', 'FOOD', 'BIO', 'DIS', 'SB', 'Ca', 'PH', 'PRO', 'SEYO'),

Dual(Others', 26),

Pick(Match(PG, 'CP', 'PC', 'VC', 'ALL')+1, PG, Dual('CPS', 12), Dual('PCS', 10), Dual('VCS', 11), Null())

)

• ###### Re: How to use Pick and Match for the below

So none of my two responses work for you Sundarraj? Just curious to know

• ###### Re: How to use Pick and Match for the below

@Sunny T Please see Aurelien Martinez code. I tried your code but I couldn't get the exact answer what I want to get. may be you can help me any time near future.

• ###### Re: How to use Pick and Match for the below

I did see his response, and I saw a slight change in one of the places, but I guess I might have missed a parenthesis or two which might not have got you the result.