Hello all,
Please see the image where I have a “grn price” value straight from the db. I need to restrict it to a number value up to the first ; that appears. Substr isn’t working when there’s less than 5 characters so does anybody know the correct syntax for this please?
Hi all, I managed to find a solution for this which seems to work. Would still be interested to know any better methods though if anyone has any lol
GRN Price1
=Substr([Grn Price];1;Pos([Grn Price];";"))
GRN Price2
=Length([GRN Price1])
GRN Price 3
=If([GRN Price2]=6;
Left([GRN Price1];5);
If([GRN Price2]=5;
Left([GRN Price1];4);
If([GRN Price2]=2;
Left([GRN Price1];1);
If([GRN Price2]=3;
Left([GRN Price1];2);
If([GRN Price2]=4;
Left([GRN Price1];3)
)
))))
GRN Price4
=ToNumber([GRN Price3])
why all the different PriceX and combinations of substr and left ?
if you only need the first price a simple left minus 1 should give you the result:
=Left([Grn Price];Pos([Grn Price];";")-1)
1 Like
thank you, that worked too, much easier