+ Reply to Thread
Results 1 to 16 of 16

Formula to change part of a cell string ?

  1. #1
    Registered User
    Join Date
    02-10-2010
    Location
    NZ
    MS-Off Ver
    Office 2016 and Office 365 and Office 2013
    Posts
    31

    Formula to change part of a cell string ?

    Dear folk

    Dear folk

    I am doing a labeling for an equipment if I want to change the first cell content for the below example to be say : Linksys.G001.F04.11,,,,,I need cell 5 to be G001.F04

    And If I want to change content of first cell to be say : HP.G0AB.R01.18,,,,,,I need cell 5 to be G0AB.R01,,,,,,,etc

    Linksys.R000.F03.10
    EARTH CHASSIS
    TO
    RACK EARTH
    R000.F03
    PII234567

    What formula do I need to do so ?

    Thx

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to change part of a cell string ?

    If it is in the same place and the same length each time you could use a mid formula, something like...
    =mid(A1,8,8) untested it could be 8,9 or 9,8, writing from an iPad isn’t easy.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    02-10-2010
    Location
    NZ
    MS-Off Ver
    Office 2016 and Office 365 and Office 2013
    Posts
    31

    Re: Formula to change part of a cell string ?

    Thx for your help
    idea is clear and it worked for me

  4. #4
    Registered User
    Join Date
    02-10-2010
    Location
    NZ
    MS-Off Ver
    Office 2016 and Office 365 and Office 2013
    Posts
    31

    Re: Formula to change part of a cell string ?

    same place and the same length each time
    Same place yes what about if it is not the same length ?

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to change part of a cell string ?

    Check the yellow banner at the top of the post, it would be best if you would upload a sample workbook that shows the different examples you would have and your expected results. Because now you’re probably going to have to incorporate a search function in the formula.

  6. #6
    Registered User
    Join Date
    02-10-2010
    Location
    NZ
    MS-Off Ver
    Office 2016 and Office 365 and Office 2013
    Posts
    31

    Re: Formula to change part of a cell string ?

    Thx Excel sheet that has samples uploaded
    You did explain sample 1 can you help with sample 2 and sample 3 in the attached excel sheet t
    Attached Files Attached Files

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to change part of a cell string ?

    this works for the three examples you put in your workbook... =MID(E27,FIND(".",E27)+1,8)

  8. #8
    Registered User
    Join Date
    02-10-2010
    Location
    NZ
    MS-Off Ver
    Office 2016 and Office 365 and Office 2013
    Posts
    31

    Re: Formula to change part of a cell string ?

    Thx Sam
    It worked for Sample 1 and Sample 2 but not 3
    Can you please recheck it
    Regards

  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to change part of a cell string ?

    what is your expected output for sample 3? If it is R000.F03 it returns that.

  10. #10
    Registered User
    Join Date
    02-10-2010
    Location
    NZ
    MS-Off Ver
    Office 2016 and Office 365 and Office 2013
    Posts
    31

    Re: Formula to change part of a cell string ?

    Sample 1 and 2 no issue

    Sample 3 I should have explained in better way sorry for the confusion
    I am looking to change only the highlighted text in bold red

  11. #11
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to change part of a cell string ?

    I'm uploading your workbook with the formula in cells G31, K31 and O31 (which is the output for Sample3) and it appears to be returning the portion you have in bold red. So again I ask, what is the expected output if what is in cell O31 is not what you expect?
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    02-10-2010
    Location
    NZ
    MS-Off Ver
    Office 2016 and Office 365 and Office 2013
    Posts
    31

    Re: Formula to change part of a cell string ?

    So again I ask, what is the expected output if what is in cell O31 is not what you expect?
    Expected output in O31 is

    PDU.R000.F03.33

  13. #13
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to change part of a cell string ?

    I don't know how to make the formula suddenly know to add the PDU. and the .33
    what circumstances would there be that could be written into a formula so it knows that under "this" circumstance you add the PDU. and the .33?
    is it that if cell M27 has C54. on the left it should add PDU. to the output? Is it that if cell M28 has A FEED -VE it should add the PDU. and the .33?

  14. #14
    Registered User
    Join Date
    02-10-2010
    Location
    NZ
    MS-Off Ver
    Office 2016 and Office 365 and Office 2013
    Posts
    31

    Re: Formula to change part of a cell string ?

    You are right you don't need to add PDU. and .33

    Please see new sample in the attached workbook
    Attached Files Attached Files

  15. #15
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to change part of a cell string ?

    try this... ="PDU."&MID(M27,FIND(".",M27)+1,8)&".33"

  16. #16
    Registered User
    Join Date
    02-10-2010
    Location
    NZ
    MS-Off Ver
    Office 2016 and Office 365 and Office 2013
    Posts
    31

    Re: Formula to change part of a cell string ?

    Thx for that ,,,appreciate your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Change the cell reference in formula to absolute for part of cell via sub routin
    By dorabajji in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-09-2019, 09:20 AM
  2. Formula help look up part of string value
    By ks1102 in forum Excel General
    Replies: 4
    Last Post: 02-17-2016, 12:50 AM
  3. [SOLVED] Macro to change 1) part of string, 2) the order of characters inside a string, 3) format
    By Karl Gustaf Karsten in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2015, 11:51 AM
  4. change part of a string in the file name and cut paste
    By choupi_nette in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-27-2015, 08:38 AM
  5. Excel 2007 : Parse string value as part of formula?
    By ecksc in forum Excel General
    Replies: 1
    Last Post: 06-14-2012, 08:50 AM
  6. [SOLVED] Formula to find the part of string.
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 05-20-2012, 10:38 AM
  7. Replies: 3
    Last Post: 05-17-2005, 06:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1