Forum Discussion

excel_learner's avatar
excel_learner
Brass Contributor
Nov 11, 2022

Left or trim function with IF

Is there a formula i can do save time avoid doing manually.
I have List of codes which have numbers

like following:

J975

K414

J993

K206

J890.01

J977

K138

K174.01


What i am trying to do is take away the “.01” from the codes that have this, and leaving the ones in tact that dont have it 

Is there a formula where i can do this ?

 

many thanks in advance

7 Replies

    • excel_learner's avatar
      excel_learner
      Brass Contributor
      Thank you for this, but what if there are codes with .02 ,.04 and 0.6 so all different kinds how would a formula remove all
      • Patrick2788's avatar
        Patrick2788
        Silver Contributor

        excel_learner 

        That wasn't clear from your first post. Here's the revision:

        =INDEX(SORT(SUBSTITUTE(A1,"."&TEXT(SEQUENCE(10),"00"),"")),1)

Resources