Skip to Content

Group Nos by Category - Need Help!! Thanks Much

I have these Nos in a field called (Sample). They all 7 combination of nos and alphabets.

(Sample)

X111230

XUBY100

YHBY120

ZYHS290

UYJ6170

DRT5431

KLM4590

ERTY120

XFTT111

XERI450

I need to exclusively call all samples that Starts with X and end with 111, All samples that starts X and end with 230, All samples that starts with X and ends with 450 and group them as "Fresh".

Appreciate the help. Thanks much

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 24, 2017 at 08:06 PM

    create variable like

    =if(left(sample;1)="X" and (right(sample;3)="111) then "Fresh" elseif(left(sample;1)="X" and (right(sample;3)="230) then "other cond" elseif....

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 26, 2017 at 05:01 AM

    Thanks Amit - Very helpful. Appreciate the quick response.

    Add comment
    10|10000 characters needed characters exceeded