Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Can anyone please share an illustrated example what is the difference between Num and Num# function?
I am familiar with Num allowing you to format a number field but not sure what Num# does.
You can see this thread for example and difference meaning
Example:-
Very simple example Suppose you have a string abc123 and you want to convert it into number then you have to use NUM#
Eg:-
=Num#('abc123', '#,##0.##', '.' , ',' ) //this gives you abc123 but if sam you use with Num it will not convert this into number
In the same if you want to get only numbers to be extract from same then first you have to use Num# then Num
=NUM( Num#('abc123,4', 'abc#,#') ,'####') // this will gives only 1234
Same for Num but here i am format my given number like i have numbers 123 and i want to format it as 123.00 then is use Num because it is already in number but i want to format it
Eg:-
=Num('123', '#,##0.##') //This will gives 123.00 and so many formats you can use
Hi Anand,
So essentially a Num# function is useful where you want to exclude string when data contains both string and numbers?
Yes but it can also used where you have the numbers in the string format and you want to convert the number into specifying format and the format may be any type of. So by the help of this function you can format the numbers also with the help of Num function.
Thanks, do you have an example like that too?
1. Num#( ) converts a string into a number by the given format mask
2. Num( ) formats a number by the given format mask
This answer is somehow confusing. For the Num#( ) function the given format mask decides if a string can be converted into a number. If it cannot be converted the string will be returned.