Note: The other languages of the website are Google-translated. Back to English
Logáil isteach  \/ 
x
or
x
Cláraigh  \/ 
x

or

Conas Carachtair Chéad, Last X nó Carachtair Poist Áirithe a bhaint as Téacs in Excel?

I gcás fhormhór na n-úsáideoirí Excel, uaireanta, ní mór duit na chéad n carachtair a scriosadh ó thús na dtéad téacs nó na carachtair x dheireanacha a bhaint ó dheireadh na dtéad téacs mar a thaispeántar thíos. An t-alt seo, tabharfaidh mé isteach roinnt cleasanna úsáideacha chun an tasc seo a réiteach go tapa agus go héasca in Excel.
 

bain na chéad x carachtair 1


Modh 1: Bain an chéad x nó an ceann deireanach de x carachtair as teaghráin téacs le foirmlí

 Bain na chéad x carachtar ó thús na dtéad téacs:

In Excel, is féidir leat na feidhmeanna CEART agus LEFT a úsáid chun líon áirithe carachtair a bhaint ó thús nó ó dheireadh na dtéad, déan mar seo le do thoil:

1. Clóscríobh nó cóipeáil an fhoirmle seo a leanas i gcill bhán C4 inar mian leat an toradh a chur:

CEART (A4, LEN (A4)-2)

agus brúigh Iontráil eochair chun an chéad toradh a fháil. Féach an pictiúr:

bain na chéad x carachtair 2

nótaí: San fhoirmle thuas:

  • A4 an luach cille atá tú ag iarraidh carachtair a bhaint;
  • An líon 2 ciallaíonn sé líon na gcarachtar is mian leat a bhaint ó thús na sreinge téacs.

2. Ansin, roghnaigh an chill C4 agus tarraing an láimhseáil líonta síos go dtí na cealla inar mian leat an fhoirmle seo a chur i bhfeidhm, agus baineadh an chéad 2 charachtar as na teaghráin téacs, féach an scáileán:

bain na chéad x carachtair 3


 Bain na x carachtair dheireanacha ó dheireadh na dtéad téacs:

Más gá duit na carachtair éagsúla dheireanacha a bhaint, is féidir leat an fheidhm LEFT a úsáid mar an gcéanna leis an bhfeidhm CEART.

Iontráil nó cóipeáil an fhoirmle seo i gcill bhán:

LEFT (A4, LEN (A4)-9)

agus ansin tarraing an láimhseáil líonta síos go dtí na cealla ar mhaith leat an fhoirmle seo a chur i bhfeidhm, agus scriosadh na 9 gcarachtar deireanacha ó na teaghráin téacs ag an am céanna, féach an scáileán:

bain na chéad x carachtair 4

nótaí: San fhoirmle thuas:

  • A4 an luach cille atá tú ag iarraidh carachtair a bhaint;
  • An líon 9 ciallaíonn sé líon na gcarachtar is mian leat a bhaint ó dheireadh na sreinge téacs.

Modh 2: Bain an chéad x nó an ceann deireanach de x carachtair as teaghráin téacs le Feidhm Shainithe ag an Úsáideoir

Seo Feidhm Sainmhínithe ag Úsáideoir a chabhróidh leat freisin an chéad nó an ceann deireanach de charachtair a bhaint as teaghráin téacs, déan mar seo le do thoil:

 Bain na chéad x carachtar ó thús na dtéad téacs:

1. Coinnigh síos an Alt + F11 eochracha a oscailt Microsoft Visual Basic d’Fheidhmchláir fhuinneog.

2. Cliceáil Ionsáigh > Modúil, agus greamaigh an cód seo a leanas i bhFuinneog an Mhodúil.

Public Function removeFirstx(rng As String, cnt As Long)
removeFirstx = Right(rng, Len(rng) - cnt)
End Function

3. Ansin téigh ar ais chuig an mbileog oibre, agus ansin cuir isteach an fhoirmle seo: = removefirstx (A4,2) isteach i gcill bhán, agus ansin tarraing an láimhseáil líonta síos chun na torthaí a fháil de réir mar a theastaíonn uait, féach an scáileán:

bain na chéad x carachtair 5

nótaí: San fhoirmle thuas:

  • A4 an cill é ar mhaith leat carachtair a bhaint di;
  • An líon 2 léiríonn sé líon na gcarachtar ar mhaith leat a bhaint ó thús na sreinge téacs.

 Bain na x carachtair dheireanacha ó dheireadh na dtéad téacs:

Chun na carachtair n dheireanacha a bhaint de na teaghráin téacs, cuir an Fheidhm Sainithe Úsáideora seo a leanas i bhfeidhm:

Public Function removeLastx(rng As String, cnt As Long)
removeLastx = Left(rng, Len(rng) - cnt)
End Function

Agus ansin cuir an fhoirmle seo i bhfeidhm: = removelastx (A4,9) chun na torthaí a fháil de réir mar is gá duit, féach an pictiúr:

bain na chéad x carachtair 6

nótaí: San fhoirmle thuas:

  • A4 an cill é ar mhaith leat carachtair a bhaint di;
  • An líon 9 léiríonn sé líon na gcarachtar ar mhaith leat a bhaint ó dheireadh na sreinge téacs.

Modh 3: Bain an chéad, an x ​​carachtar deireanach nó carachtair suímh áirithe gan aon fhoirmlí

Níl sé chomh díreach agus atá sé feidhmeanna Excel a úsáid chun carachtair áirithe a bhaint. Féach díreach ar an mbealach a chuirtear ar fáil sa mhodh seo, nach mó ná dhá nó trí chlic luch. Leis an Bain de réir Seasamh fóntais an bhreiseáin tríú páirtí Kutools le haghaidh Excel, is féidir leat a bheith furasta carachtair an chéad, an ceann deireanach nó carachtair áirithe a bhaint den sreangán téacs. Cliceáil chun Kutools a íoslódáil le haghaidh Excel! Féach thíos an taispeántas:

Tar éis a shuiteáil Kutools le haghaidh Excel, déan iarratas le do thoil Bain de réir Seasamh de réir na gcéimeanna seo:

1. Roghnaigh an raon a theastaíonn uait na carachtair áirithe a bhaint. Ansin cliceáil Kutools > Téacs > Bain de réir Seasamh. Féach an pictiúr:

2. Sonraigh na hoibríochtaí seo a leanas sa aníos Bain de réir Seasamh dialóg.

  • (1.) Sonraigh líon na gcarachtar atá le scriosadh.
  • (2.) Roghnaigh Ó chlé rogha faoin Post alt chun na chéad n carachtair a scriosadh, féach an pictiúr:

bain na chéad x carachtair 8

Leid: An Bain de réir Seasamh is féidir le fóntais cabhrú leat na n carachtair dheireanacha nó na carachtair áirithe a bhaint as suíomh ar leith.

Modh 4: Bain an chéad x agus an x ​​carachtar deireanach as teaghráin téacs le foirmle

Uaireanta, ba mhaith leat carachtair a bhaint as teaghráin téacs ar an dá thaobh, mar shampla, ní mór duit an chéad 2 charachtar a bhaint agus na 9 gcarachtar deiridh a bhaint amach ag an am céanna. Anseo, is féidir leis an bhfeidhm MID fabhar a dhéanamh duit.

1. Iontráil nó cóipeáil an fhoirmle seo i gcill bhán:

= MID (A4,3, LEN (A4)-11)

agus brúigh Iontráil eochair chun an chéad toradh a fháil. Féach an pictiúr:

bain na chéad x carachtair 11

nótaí: San fhoirmle thuas:

  • A4 an luach cille atá tú ag iarraidh carachtair a bhaint;
  • An líon 3 an bhfuil ceann amháin níos mó ná líon na gcarachtar is mian leat a bhaint den taobh clé;
  • An líon 11 is é líon iomlán na gcarachtar is mian leat a bhaint.

2. Ansin, roghnaigh an chill C4 agus tarraing an láimhseáil líonta síos go dtí na cealla inar mian leat an fhoirmle seo a chur i bhfeidhm, agus baineadh na chéad 2 charachtar agus na 9 gcarachtar deiridh go léir as na teaghráin téacs, féach an scáileán:

bain na chéad x carachtair 12



Na hUirlisí Táirgiúlachta Oifige is Fearr

Réitíonn Kutools for Excel an chuid is mó de do chuid Fadhbanna, agus Méadaíonn sé do Tháirgiúlacht 80%

  • Athúsáid: Cuir isteach go tapa foirmlí casta, cairteacha agus aon rud a d'úsáid tú roimhe seo; Cealla a Chriptiú le pasfhocal; Cruthaigh Liosta Ríomhphoist agus seol ríomhphoist ...
  • Barra Foirmle Super (cuir línte iolracha téacs agus foirmle in eagar go héasca); Leagan Amach Léitheoireachta (líon mór cealla a léamh agus a chur in eagar go héasca); Greamaigh go dtí an Raon Scagtha...
  • Cumaisc Cealla / Sraitheanna / Colúin gan Sonraí a chailleadh; Ábhar Cealla Scoilt; Comhcheangail Sraitheanna / Colúin Dúblacha... Cill Dúblach a Chosc; Déan comparáid idir Ranganna...
  • Roghnaigh Dúblach nó Uathúil Sraitheanna; Roghnaigh Blank Rows (tá na cealla uile folamh); Aimsigh Super agus Fuzzy Aimsigh i go leor Leabhar Oibre; Roghnaigh go randamach ...
  • Cóip Díreach Cealla Il gan tagairt fhoirmle a athrú; Tagairtí Cruthaigh Auto chuig Bileoga Il; Cuir Urchair isteach, Boscaí Seiceála agus go leor eile ...
  • Sliocht Téacs, Cuir Téacs leis, Bain de réir Poist, Bain Spás; Subtotals Paging a chruthú agus a phriontáil; Tiontaigh Idir Ábhar Cealla agus Tráchtanna...
  • Scagaire Super (scéimeanna scagaire a shábháil agus a chur i bhfeidhm ar bhileoga eile); Ard-Sórtáil de réir míosa / seachtaine / lae, minicíocht agus níos mó; Scagaire Speisialta le cló trom, iodálach ...
  • Comhcheangail Leabhair Oibre agus Bileoga Oibre; Cumaisc Táblaí bunaithe ar eochaircholúin; Roinn Sonraí i Ilbhileoga; Baisc Tiontaigh xls, xlsx agus PDF...
  • Níos mó ná 300 gné chumhachtach. Tacaíochtaí Office / Excel 2007-2019 agus 365. Tacaíonn sé le gach teanga. Imscaradh éasca i d’fhiontar nó d’eagraíocht. Gnéithe iomlána triail saor in aisce 30 lá. Ráthaíocht ar ais airgid 60 lá.
cluaisín kte 201905

Tugann Tab Oifige comhéadan Tabbed chuig Office, agus Déan Do Obair i bhfad Níos Éasca

  • Cumasaigh eagarthóireacht agus léamh tabbed i Word, Excel, PowerPoint, Foilsitheoir, Rochtain, Visio agus Tionscadal.
  • Oscail agus cruthaigh cáipéisí iolracha i gcluaisíní nua den fhuinneog chéanna, seachas i bhfuinneoga nua.
  • Méadaíonn do tháirgiúlacht 50%, agus laghdaíonn sé na céadta cad a tharlaíonn nuair luch duit gach lá!
bun officetab
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    internet9135@gmail.com · 1 years ago
    Hi I have a data with names and surnames of some people, i want to separate surname in coloumn and name in another coloumn, surnames are not same like michel, john, daniel, williams like please help me to separate surname by using formula, I have lot of data
    • To post as a guest, your comment is unpublished.
      skyyang · 1 years ago
      Hi, Giridhar,
      Maybe the below article can solve your problem, please try, thank you!
      https://www.extendoffice.com/documents/excel/829-excel-split-first-last-name.html
  • To post as a guest, your comment is unpublished.
    Jakub · 1 years ago
    If number or character differ you can use example below (I needed to remove the last character):
    =PART(A1;1;(LENGTH(A1)-1))
  • To post as a guest, your comment is unpublished.
    NABEEL · 2 years ago
    I WANT TO TRIM TEXT LENGTH, FOR EXAMPLE I HAVE SOME ADDRESS THAT LENGTH SOME COLUM 10 CHARECTOR AND SOME COLUM 20 CHARECTOR SOME 15 CHARECTOR IN THIS CASE I WANT TO TRIM WHICH COLUM TEXT MORE THAN 15 I WANT TO TRIM THAT COLUM TEXT TO 15 CHARECTOR, DONT TRIM OTHER COLUM TEXTS


    ANYBODY HELP ME
    • To post as a guest, your comment is unpublished.
      Velks · 1 years ago
      Use "text to column"
  • To post as a guest, your comment is unpublished.
    dezignextllc@gmail.com · 2 years ago
    Very helpful tip. Something we use a lot in our environment.
  • To post as a guest, your comment is unpublished.
    Serkan · 2 years ago
    I gave function error when I apply formula to cell. After 2 hours I try it again by using (;) instead of (,) and result positive. As result of;
    =removelastx(E4,3) (not working)
    =removelastx(E4;3) (working)
  • To post as a guest, your comment is unpublished.
    Sameer · 2 years ago
    How to remove the first character from a cell but not in every cell in that column? Thanks!
  • To post as a guest, your comment is unpublished.
    Randy Ralston · 2 years ago
    This helped to get the result from an entry but I am unable to LOOKUP the new value.
  • To post as a guest, your comment is unpublished.
    Mohammad Barzakh · 2 years ago
    This really helps me a lot in my daily working.

    Thanks
  • To post as a guest, your comment is unpublished.
    siena · 2 years ago
    Hi,
    I have the formula that gives me the #value error that I don't seem to be able to figure out how to fix it.

    Thank you in advance.
  • To post as a guest, your comment is unpublished.
    Jesus · 3 years ago
    How can I type the command to cut text from the left and the right?
  • To post as a guest, your comment is unpublished.
    wingstana@gmail.com · 3 years ago
    I can't make this formula work, I type : =LEFT(A1,LEN(A1)-4) and it gives error everytime.
    My A1 column has the following data: ELDB-AK-S-42228-001


    Why isn't this working?
  • To post as a guest, your comment is unpublished.
    Myke · 3 years ago
    i have a list of sizes that have numbers and names, words,etc. i want to remove all letters in the entire column leaving only the numbers. how do i remove all letter which come in hundreds of different variations and lengths?
  • To post as a guest, your comment is unpublished.
    Muhammad Awais Youna · 3 years ago
    Helpful, thanks
  • To post as a guest, your comment is unpublished.
    Jeremy · 3 years ago
    Hi there everyone,
    I am trying to remove an initial in a field that includes a persons name. An example is

    Taylor Jeremy D In this example I am trying to remove the D and just leave surname and first name there.

    The problem is that I have a heap of data which is inconsistently entered meaning that some of the fields have an initial (like that above) and some just say a name like Taylor Jeremy (without an initial).



    Any ideas so that I can have a consistent data set and one that excludes the initial?
    • To post as a guest, your comment is unpublished.
      garza01 · 3 years ago
      Try this, it solves exactly the way you want it.


      =IF((IFERROR((FIND(" ",A1,((FIND(" ",A1,1))+1)))/(FIND(" ",A1,((FIND(" ",A1,1))+1))),0))=1,LEFT(A1,((FIND(" ",A1,((FIND(" ",A1,1))+1)))-1)),A1)



      A1 is Taylor Jeremy D or without the D, as you wish
    • To post as a guest, your comment is unpublished.
      Jorge · 3 years ago
      Just for lettiing you know that I solved your problem, I hope im not too late.

      =SI((SIERREUR((TROUVE(" ";R9;((TROUVE(" ";R9;1))+1)))/(TROUVE(" ";R9;((TROUVE(" ";R9;1))+1)));0))=1;GAUCHE(R9;((TROUVE(" ";R9;((TROUVE(" ";R9;1))+1)))-1));R9)



      Cell R9 is your Taylor Jeremy D, try it with and without the D and you'll see it works fine
    • To post as a guest, your comment is unpublished.
      Sigma · 3 years ago
      If the text name (Taylor Jeremy D) located in A1, you can use below function to acheive the result (remove the last name):
      =LEFT(A1,FIND(" ",A1,1))&LEFT(RIGHT(A1,LEN(A1)-A2),FIND(" ",RIGHT(A1,LEN(A1)-A2))-1)
      • To post as a guest, your comment is unpublished.
        Alex B. · 3 years ago
        Can also be accomplished with the below string, which is simpler and doesn't require formulas in multiple cells. Following same assumption that data is in A1 and the initial is always 1 character. TRIM function added within the LEN function in case there are unseen trailing spaces in the data. TRIM function added at the beginning of the formula will delete any residual spacing after the LEFT function is executed.

        =TRIM(LEFT(A1,LEN(TRIM(A1))-1))

        Or if you don't like the leading TRIM function you can subtract 2 characters from the LEN function instead of just the one. I prefer TRIM route in case there are more than 1 spaces in between the name and middle initial - have to account for inconsistent data entry.

        =LEFT(A1,LEN(TRIM(A1))-2)
  • To post as a guest, your comment is unpublished.
    pejot · 3 years ago
    Hi there,
    im looking for a solution. Problem is that i have two colums of data where 1st column contain some text that part of is invalid and need to be removed, 2nd column contain invalid text string.


    Let's say cell A1 contain text string "ABCDEF"

    Cell A2 contain invalid part of the string, for example "CD"


    After removing invalid text string, cell A1 will look like this: "ABEF".

    How to do that? Thanks in advance!
    • To post as a guest, your comment is unpublished.
      Gaurav · 3 years ago
      Hey you can do this with a combination of functions:


      =CONCATENATE(LEFT(Y4;FIND("c";Y4)-1);RIGHT(Y4;LEN(Y4)-FIND("c";Y4)-1))



      Concatenate brings the two strings together, because you want to take a left side of the string and combine it with a right side of the string eliminating the middle values.
  • To post as a guest, your comment is unpublished.
    G · 3 years ago
    remove all but the characters after a certain character. =RIGHT(G2,LEN(G2)-FIND("[",G2,4)). I was doing this for states so I had to convert the state into a unique character to reduce it down to 1 character rather then " NM ".
  • To post as a guest, your comment is unpublished.
    Tumisang · 3 years ago
    Good day



    Kindly assist in removing the letters which appear like that on numbers using excel







    26772309814Trudie



    Regards
    • To post as a guest, your comment is unpublished.
      Biswanath · 2 years ago
      Use the formula =RIGHT(A2,LEN(A2)-11)
  • To post as a guest, your comment is unpublished.
    chandran k · 3 years ago
    Hai

    Ex : AS SPLSH (CW) 100ml (112)

    hove to remove last (sum numbers)
  • To post as a guest, your comment is unpublished.
    Manohar Adsule · 3 years ago
    Worked for me. Thanks
  • To post as a guest, your comment is unpublished.
    Mohamed · 3 years ago
    [b]very nice tip[/b]
  • To post as a guest, your comment is unpublished.
    thilip · 3 years ago
    Please tell me how to get particular data in a cell
    Example
    Column A
    Ip-bs-bedroom
    Gh-ff-kitchen
    Ip-gh-main door
    .
    .
    Now I want in column B has only location ,that's bedroom, kitchen so I want to remove other except location
    • To post as a guest, your comment is unpublished.
      Pratik · 3 years ago
      You can use Find and Replace (Ctr + H). Find what: "*-" and Replace with: keep this field blank. Then click replace.
  • To post as a guest, your comment is unpublished.
    Manish Gupta · 4 years ago
    Dear Member,
    How do we find
    Data Required
    201 205
    2102 2105
    203 205
    2015 2015
    207 210
    2147 2150
    1000 1000
  • To post as a guest, your comment is unpublished.
    HELPY · 4 years ago
    Hi I want to remove everything after the first dash(-) and keep only the letters.
    How do I do that?
    example 123-ABC-BDER-AKD
    • To post as a guest, your comment is unpublished.
      baba · 3 years ago
      try =RIGHT(A1, LEN(A1)-4) assuming characters before the first (-) are 3 digits long
  • To post as a guest, your comment is unpublished.
    Praveen Issac Shaji · 4 years ago
    Hi,

    I need support from Kutools team as i believe only you guys can help me. I have purchased a kutools license and couldn't find this feature in it.

    I would like to password protect/unprotect a 'sheet1' of 300 workbooks in one folder.
    For example: Only certain cells are editable in the password protected sheet1. You need to unprotect it with a password to edit all the cells.

    Scenario : When I open a workbook sheet1 opens and only certain cells are editable.(This is for on fields workers)
    For office purpose all the cells have to be editable and this is protected with a password which on field workers don't know.

    After some editing we have to protect back the sheet and save it.
    This happens for 300 workbooks' sheet1.
    So everytime

    [b]Opening workbook -> Review->Unprotect Sheet->Enter Password.[/b]
    After Changes
    [b]Review->Protect sheet->Enter Password->Save
    [/b]

    Can we do the above steps for a folder of workbooks using a VBA or any such help would be much appreciated.
  • To post as a guest, your comment is unpublished.
    Saif · 4 years ago
    I have data on browsers used by users where in I need to separate version type and names.
    Formula used by me is =LEFT(F7(MIN(FIND({0,1,2,3,4,5,6,7,8,9},F7&"0123456789")))-1). But its not working for all inputs. Data available is List of browser versions. Output needed is Group the browser versions. For example, Google Chrome 9.0, Google Chrome 9.1 and Google Chrome 9.3 should be grouped under “Google Chrome”. Version => Type: Google Chrome 9.1 => Google Chrome. Google Chrome 9.0 => Google Chrome. Google Chrome 8.0 => Google Chrome. Google Chrome 7.0 => Google Chrome. Google Chrome 6.0 => Google Chrome. Conditions are: Do not pivot the table. Need two columns – Version and Type. You can split the column but the catch is, few versions have numbers in the beginning. Eg: 360 Secure Browser
  • To post as a guest, your comment is unpublished.
    Maria · 4 years ago
    Hi!

    I Would like to removed selected characters on my excel workbook, how will i do that? is there any formulas for it?

    your immediate advice is highly appreciated.

    Thanks & BR,
  • To post as a guest, your comment is unpublished.
    Carlos · 4 years ago
    Hi.
    I would like to remove the last characters by using find and replace, but with Excel's Visual Basic (with commands).
    I would like to create a file that loads an existing file and creates a new one, with the column edited.

    Any help will be appreciated.

    Regards,
  • To post as a guest, your comment is unpublished.
    YODA · 4 years ago
    how can I mass delete a * in a excel spreadsheet description line?
    • To post as a guest, your comment is unpublished.
      Xavier · 4 years ago
      Hi Yoda,

      just do a find and replace. You can easily acces the function using CTRL+F.
      You will want to look for "*" and replace with ""
      basically, wherever excel finds * it will replace it with a blank.
  • To post as a guest, your comment is unpublished.
    N-tone · 4 years ago
    Thanks you for a very simple and a comprehensible approach. It works!!!! God bless you my dear Fellow-Anonymous!
    It took me 2 days of painful searches through Russian web and quite a number brain cells to find Excel Functions in Russian with explanatory notes provided, but all was in vain just because formulas refuse to work!! It seems like the accessibility and the total unwillingless to share common practices among my Russian colleagues, who just pretend they know *uck all about Microsoft products is still a big issue!!
    No, seriously, I owe u!
    Thanks!
  • To post as a guest, your comment is unpublished.
    narender · 4 years ago
    send the kutools for xp
  • To post as a guest, your comment is unpublished.
    Ramin Ramesh · 4 years ago
    hey tanx dears
    Replace All worked for me. hhhh very good trick..
  • To post as a guest, your comment is unpublished.
    SARPK · 4 years ago
    I want to delete the left 4 digit in whole sheet...

    for example 5895012032251........the result should be 012032251
    I can do the one only but how to do in whole worksheet..
  • To post as a guest, your comment is unpublished.
    Sachin Sawang · 4 years ago
    Hi Team,

    Need formula for removing first character from cell if it is special only.

    Kindly help...
  • To post as a guest, your comment is unpublished.
    Slamat · 4 years ago
    use subsitute function
  • To post as a guest, your comment is unpublished.
    Rao · 4 years ago
    Hi all
    Is there any way to remove Vowels from a alpha string. say 'Connector, the result supposed to be 'cnnctor'.
    • To post as a guest, your comment is unpublished.
      xavier · 4 years ago
      Hi,

      The easiest way is to do a Find and replace. Select you range, do ctrl-F then find O replace with blank. This will remove all,'O's and replace with no character, which will remove them.

      Do this with each vowel and you are done. No formula required
  • To post as a guest, your comment is unpublished.
    Lourie · 4 years ago
    Hi! Thank you so much for this article! It has saved me so much time.
  • To post as a guest, your comment is unpublished.
    Shabi · 4 years ago
    My string is like this "1400 10-07-1975"
    I want to keep only the first "1400"
    I tried, It worked for the first time with that search and replace function... but I'm unable to repeat it by putting "space*" in "find what" section
    Please help...
    • To post as a guest, your comment is unpublished.
      David · 4 years ago
      =LEFT(A1,SEARCH(" ",A1)-1) Should do the trick.
      Basically saying;
      I want text starting from the left of the string in A1, then i want to find the location of the first instance of a space and minus one from that. (otherwise your found string will contain the space).
      Simple enough, hope this helps.
  • To post as a guest, your comment is unpublished.
    Russell A · 4 years ago
    THANK GOD!!!! You just saved me two day's of work from Excel loosing all formatting. I'm going to champion this software for use within my group. You just got at least one new customer.
  • To post as a guest, your comment is unpublished.
    Indra Raj · 4 years ago
    I used this one RIGHT(B1, LEN(B1)-2)
    Thanks
  • To post as a guest, your comment is unpublished.
    CHRIS · 4 years ago
    I have data that contains both Chinese and English and I would like to trim the data so that only the English appears. The data is varying lengths and the Chinese characters I would liked trimmed are also varying lengths. How might I be able able to do this. The data looks like this:

    待摊车辆保险Prepaid vehicle insurance fee
    待摊保险费Prepaid insurance fee
    原材料Raw material
  • To post as a guest, your comment is unpublished.
    George · 4 years ago
    Hi,
    I need help with product database.

    I have names of products from database for example:
    /cars/new/car1.jpg
    /cars/car red2.jpg
    /trucks/new/for sale/34533.jpg

    So I need only the text after the last slash (jpg file name):
    car1.jpg
    car red2.jpg
    34533.jpg

    I can't predict how long it is part before slash / and after slash. It is different for different cells.

    Any solution? Thank you so much
    • To post as a guest, your comment is unpublished.
      shah · 3 years ago
      use column to text in data section
  • To post as a guest, your comment is unpublished.
    Aks · 4 years ago
    ABC xyz pq Replace Me(s)
    output: "ABC RE"
    EFG xyz pq Change This(
    output: "EFG CT"

    I have data similar to dummy data in above 2 lines in excel. Request your help to provide a formula that will replace the complete line with "RM" if found with text "Replace Me(s)" and "CT" if found with text "Change This("
  • To post as a guest, your comment is unpublished.
    SAMULA · 5 years ago
    25/06/1994
    27/12/1984
    01/07/1991
    12/02/1977
    12/02/1977
    09/07/1976
    01/01/1974
    01/01/1974
    hello, from the above, how do i remove the first characters, i want to remain with the last 4 digits eg 1977, 1976,
    • To post as a guest, your comment is unpublished.
      shah · 3 years ago
      =year(date)
      you can get year
    • To post as a guest, your comment is unpublished.
      Dave · 5 years ago
      [quote name="SAMULA"]25/06/1994
      27/12/1984
      01/07/1991
      12/02/1977
      12/02/1977
      09/07/1976
      01/01/1974
      01/01/1974
      hello, from the above, how do i remove the first characters, i want to remain with the last 4 digits eg 1977, 1976,[/quote]

      Try
      =RIGHT(A1,4)
      This says;
      Starting from the right of cell A1, give me the last 4 characters.
  • To post as a guest, your comment is unpublished.
    natalie · 5 years ago
    I just want to say "thank you" for this tip; it has been EXTREMELY helpful!
  • To post as a guest, your comment is unpublished.
    Zia Ahmed · 5 years ago
    [quote name="Dave"][quote name="Michael M."]Hi!
    I have issues applying the formula for removing the first 4 characters
    =RIGHT(A1, LEN(A1)-4)
    When I insert it into Excel it opens an error window, saying that the formula is incorrect and marking =RIGHT([b]A1,[/b] LEN(A1)-4).
    Why???[/quote]
    Your code works fine for me. may be an issue with your version of excel. try putting the len(a1)-1 in brackets.
    Failing that, tr;
    =MID(A1,5,LEN(A1))
    And, obviously, make sure you are not putting this code into cell A1.
    i realise that these comments take about a month or two to get added, but i hope this helps.[/quote]
    I nomally use this type of data sq/02/16/144/g/2/10 i want all data after last slash. what i do pls. guide
    • To post as a guest, your comment is unpublished.
      Dave · 5 years ago
      [quote name="Zia Ahmed"][quote name="Dave"][quote name="Michael M."]Hi!
      I have issues applying the formula for removing the first 4 characters
      =RIGHT(A1, LEN(A1)-4)
      When I insert it into Excel it opens an error window, saying that the formula is incorrect and marking =RIGHT([b]A1,[/b] LEN(A1)-4).
      Why???[/quote]
      Your code works fine for me. may be an issue with your version of excel. try putting the len(a1)-1 in brackets.
      Failing that, tr;
      =MID(A1,5,LEN(A1))
      And, obviously, make sure you are not putting this code into cell A1.
      i realise that these comments take about a month or two to get added, but i hope this helps.[/quote]
      I nomally use this type of data sq/02/16/144/g/2/10 i want all data after last slash. what i do pls. guide[/quote]

      try;
      =RIGHT(A1,LEN(A1)-SEARCH("^^",SUBSTITUTE(A1,"/","^^",LEN(A1)-LEN(SUBSTITUTE(A1,"/","")))))
  • To post as a guest, your comment is unpublished.
    Aman Gupta · 5 years ago
    what will the solution
    if have diffrent text in the colloum with some number whether in middle,in the beginning or in last how to remove all text in the colloum except numbers plz reply
  • To post as a guest, your comment is unpublished.
    Michael M. · 5 years ago
    Hi!
    I have issues applying the formula for removing the first 4 characters
    =RIGHT(A1, LEN(A1)-4)
    When I insert it into Excel it opens an error window, saying that the formula is incorrect and marking =RIGHT([b]A1,[/b] LEN(A1)-4).
    Why???
    • To post as a guest, your comment is unpublished.
      shah · 3 years ago
      =mid(A1,4,len(a1))
    • To post as a guest, your comment is unpublished.
      Dave · 5 years ago
      [quote name="Michael M."]Hi!
      I have issues applying the formula for removing the first 4 characters
      =RIGHT(A1, LEN(A1)-4)
      When I insert it into Excel it opens an error window, saying that the formula is incorrect and marking =RIGHT([b]A1,[/b] LEN(A1)-4).
      Why???[/quote]
      Your code works fine for me. may be an issue with your version of excel. try putting the len(a1)-1 in brackets.
      Failing that, tr;
      =MID(A1,5,LEN(A1))
      And, obviously, make sure you are not putting this code into cell A1.
      i realise that these comments take about a month or two to get added, but i hope this helps.
  • To post as a guest, your comment is unpublished.
    kittu · 5 years ago
    CPCB07-PV-0043-03
    I have this type of entries in 1000s.
    my task is to fill automatically, PV , in adjacent cell.
    how can I do this?
    kindly help
    • To post as a guest, your comment is unpublished.
      Xavier Daneau · 5 years ago
      your question is not clear, can you give more details?
    • To post as a guest, your comment is unpublished.
      Dave · 5 years ago
      [quote name="kittu"]CPCB07-PV-0043-03
      I have this type of entries in 1000s.
      my task is to fill automatically, PV , in adjacent cell.
      how can I do this?
      kindly help[/quote]

      =MID(A2,(SEARCH("-",A2,1)+1),(SEARCH("-",A2,(SEARCH("-",A2,1)+1))-(SEARCH("-",A2,1)+1)))

      So, this one assumes the PV is always enclosed in "-" and that it is always after the first "-".
      It will look in cell A2, and then look for the first instance of "-" and start the copy from after that point. To find the number of characters to copy, it will look for the first "-" and then look for the second "-" and calculate the number of characters in between by subtracting the position of the second dash from the position of the first.
      Its a lot simpler than i make it sound.
      If it will always be two characters, (PV for example, you can simplify it with;
      =MID(A2,(SEARCH("-",A2,1)+1),2)
      which will look for the first instance of "-" and copy the two characters after it.

      Hope this helps.
  • To post as a guest, your comment is unpublished.
    LINZEY · 5 years ago
    Hello, how would I select information in the middle of a string?
    For example I have this: ADR292000600001200178BLOSSOMDRIVE. And I'm looking to select ONLY the 15 digits after the 'ADR'.
    I can't seem to find a way to do this.
    Thanks
    • To post as a guest, your comment is unpublished.
      Xavier Daneau · 5 years ago
      Yes, just use the MID function
      ADR292000600001 200178BLOSSOMDR IVE
      If your data is in A1 : start at the 4th char, return 15 char from that start position
      =MID(A1,4,15)
    • To post as a guest, your comment is unpublished.
      Dave · 5 years ago
      [quote name="LINZEY"]Hello, how would I select information in the middle of a string?
      For example I have this: ADR292000600001200178BLOSSOMDRIVE. And I'm looking to select ONLY the 15 digits after the 'ADR'.
      I can't seem to find a way to do this.
      Thanks[/quote]


      =MID(A2,4,15)

      This will select the text within a string in cell A3, starting at position 4 (Assuming it always starts with ADR) and selecting only the 15 characters after "ADR" (Again assuming the information you wants is always only 15 characters long. Spaces count as characters also.)
  • To post as a guest, your comment is unpublished.
    Richie · 5 years ago
    Great info on this site as usual - I'm looking for something similar, maybe just not asking my question in the right way.

    I have a combination of the following and want to remove the numbers from each step ([b]4.[[/b]b][][/b]),([b]5.[[/b]b][][/b]) etc then (1)[]).
    Basically, I want the bottom 6 steps to look like the top 3

    Thanks in advance

    VERIFY AND CHECK
    DRAIN LUBRICANT
    REFILL WITH FRESH
    4. CHECK
    5. COMPLETE THE ATTACHED
    6. ENSURE EVERYTHING
    1) SWITCH THE FOLLOWING
    2) VISUALLY CHECK
    3) SWITCH ALARM
    • To post as a guest, your comment is unpublished.
      Dave · 5 years ago
      [quote name="Richie"]Great info on this site as usual - I'm looking for something similar, maybe just not asking my question in the right way.

      I have a combination of the following and want to remove the numbers from each step ([b]4.[[/b]b][][/b]),([b]5.[[/b]b][][/b]) etc then (1)[]).
      Basically, I want the bottom 6 steps to look like the top 3

      Thanks in advance

      VERIFY AND CHECK
      DRAIN LUBRICANT
      REFILL WITH FRESH
      4. CHECK
      5. COMPLETE THE ATTACHED
      6. ENSURE EVERYTHING
      1) SWITCH THE FOLLOWING
      2) VISUALLY CHECK
      3) SWITCH ALARM[/quote]


      =RIGHT(A2,(LEN(A2)-SEARCH(" ",A2,1)))

      Assuming your step number always has a space after it.