PDA

View Full Version : Search a last digit e.g 0 and trim to give rest



excel_learner
01-22-2013, 01:41 PM
I am looking for a formula which searches last digit, 0 in this case, and separates the the number after 0 in next cell as below







Number
Required


1000000092
92


1000000183
183


1000001184
1184


1000021184
21184






kindly assist

Admin
01-22-2013, 02:06 PM
Hi,

try

=--MID(A2,MATCH(2,INDEX(1/(--MID(A2,ROW(INDEX(A:A,1):INDEX(A:A,LEN(A2))),1)=0), 0,0))+1,255)

excel_learner
01-22-2013, 02:25 PM
Thanks, but i think i did not realise there are zeros in the rest of the numbers as well for which the above formula gives error, sorry for that...





1000000820
#VALUE!


1000001730
#VALUE!


1000002640
#VALUE!


1000002640
#VALUE!


1000000820
#VALUE!


1000001730
#VALUE!


1000003550
#VALUE!


1000000820
#VALUE!


1000001730
#VALUE!


1000002640
#VALUE!


1000004460
#VALUE!


1000005370
#VALUE!


1000006280
#VALUE!


1000005370
#VALUE!

Admin
01-22-2013, 03:14 PM
Hi

If the format is like 10000##### then

=--MID(A2,5,255)

would suffice.

excel_learner
01-22-2013, 07:02 PM
this works ok, thanks