I have a text field for example:
There are 8% of people who wear red
I'd like to extract whatever number is before the "%" sign.
I got as far as [FONT="]=MID([/FONT][FONT="]AJ2[/FONT][FONT="],FIND[/FONT][FONT="]([/FONT][FONT="]"%",[/FONT][FONT="]AJ2[/FONT][FONT="])[/FONT][FONT="]-3,LEN[/FONT][FONT="]([/FONT][FONT="]AJ2[/FONT][FONT="])[/FONT]) which kind of works but leaves everything after the % sign. I just want the number ideally.
Also some of the numbers are 12.3% others might be 1% so simply extracting the 3 characters before the % sign doesn't work reliably.
Is there a better way of doing this?
Thanks in advance.
There are 8% of people who wear red
I'd like to extract whatever number is before the "%" sign.
I got as far as [FONT="]=MID([/FONT][FONT="]AJ2[/FONT][FONT="],FIND[/FONT][FONT="]([/FONT][FONT="]"%",[/FONT][FONT="]AJ2[/FONT][FONT="])[/FONT][FONT="]-3,LEN[/FONT][FONT="]([/FONT][FONT="]AJ2[/FONT][FONT="])[/FONT]) which kind of works but leaves everything after the % sign. I just want the number ideally.
Also some of the numbers are 12.3% others might be 1% so simply extracting the 3 characters before the % sign doesn't work reliably.
Is there a better way of doing this?
Thanks in advance.