Hi guys, I have a question: I got codes from supermarket products and have to redirect them to their sectors. All the products have 5-digit. The problem is that products that start with the number 0, become a 4-digit product, so the 0 goes away and the product goes to clothes. FJCC helped me another time but now I don't get what I am doing wrong.
What I want is for example every product that starts with 01 or 02 goes to the food sector, products that start with 10 or 20 belong to clothes...
You should treat the Code variable as a character rather than an integer/numeric. Leading zeroes will always be removed for numeric data by default. If you enclose the numbers in quotes, and treat them as strings, then you won't have this issue.