Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have phone number as below
00353 (0) 87 1706453
I can remove leading zeroes by using below function.
Replace(Replace(Ltrim(replace(replace(replace(Number,' ','_'),0,' '),'+',' ')),' ',0),'_',' ') as Number_1
can anyone help me how to remove spaces and brackets
how to replace 4765 in place of 0 which is in first place for below number
0504634545
Thanks.
Have a look at the PurgeChar() function.
Or better still, the keepchar function:
KeepChar(Number, '0123456789')
You can also add in other characters, such as period and comma, if you want to keep those also.
Steve
Num(Trim(PurgeChar([Field1],'-+()')))
will turn
00353 (0) 87 1706453
into
3530871706453
which is a believe what you are ultimately after?
hope that helps
Joe
Hi
Use which ever works for you
=Mid(KeepChar(Number, '0123456789'),3) or if you are getting 00 at the begining use and if condition
=If(Mid(KeepChar(Number, '0123456789'),1,2)='00',Mid(KeepChar(Number, '0123456789'),3),KeepChar(Number, '0123456789')) AS Number_1
Hi Amelia
Please use below formual, it will fulfill you requirement
num(Mid(KeepChar(Number, '0123456789'),3))
please check below image
Num(KeepChar(Number, '0123456789'))
='4765'&Replace(LTrim(Replace(KeepChar('00353 (0) 87 1706453', '0123456789'),'0',' ')),' ','0')
hope this helps
regards
Marco
The "Num(KeepChar(Number, '0123456789'))" approach I posted before does not work for numbers as long as your example because it can't be intertreted as an integer (to long).
hope this helps
regards
Marco
Hi Amelia
I suggest may be try this
=4765 & Mid(KeepChar('00353 (0) 87 1706453','0123456789'),3)
Hope it helps
Gabriel