Excel: remove last 2 digits from number
Solved
Papillon
-
Fatyyyy -
Fatyyyy -
Hello,
I am looking to remove the last 2 digits from a number that has a variable number of digits.
Is there a solution?
Thank you in advance, generous experts.
Configuration: Windows XP / Internet Explorer 6.0
I am looking to remove the last 2 digits from a number that has a variable number of digits.
Is there a solution?
Thank you in advance, generous experts.
Configuration: Windows XP / Internet Explorer 6.0
3 réponses
Hello,
Yes, thanks to the function =LEFT(text;number of characters)
Just tell Excel that the number of characters to extract is equal to the total number of characters in the cell minus 2; so LEN(A1)-2
Suppose your number is in A1 (example: 123456789), in B1 write:
=LEFT(A1;LEN(A1)-2)
you get: 1234567
EDIT:
The magic trick is that it also works on the right:
=RIGHT(A1;LEN(A1)-2)
you then get: 3456789
"Let me guess... Your nickname is 'Bandwidth'?"
- The Tribunal of blatant absurdities - P.Desproges -
Yes, thanks to the function =LEFT(text;number of characters)
Just tell Excel that the number of characters to extract is equal to the total number of characters in the cell minus 2; so LEN(A1)-2
Suppose your number is in A1 (example: 123456789), in B1 write:
=LEFT(A1;LEN(A1)-2)
you get: 1234567
EDIT:
The magic trick is that it also works on the right:
=RIGHT(A1;LEN(A1)-2)
you then get: 3456789
"Let me guess... Your nickname is 'Bandwidth'?"
- The Tribunal of blatant absurdities - P.Desproges -
Thank you very much