+ Reply to Thread
Results 1 to 11 of 11

Formula to look and modify the data from another cell

  1. #1
    Registered User
    Join Date
    02-09-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    5

    Formula to look and modify the data from another cell

    Doubt.JPG

    I have a data set as shown in the image in Colum A. I need to convert the abbreviation of the names in another colum as shown in Column B. I have totally 150 rows like this. SO it is difficult to do that manually. I tried with substitute(A1, "jhn","john"). It worked for the abbrviation with jhn. But not for the remaining. Then I tried with If(A1=jhn,Substitute(.....). It results in large argument. Need some suggestionjs to solve this. Thank you.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Formula to look and modify the data from another cell

    Welcome to the forum.

    You may try VLookup formula like this...
    Considering your lookup table is in column A:B and lookup values are in column D, then try this...
    In E1
    Please Login or Register  to view this content.
    Vlookp.jpg

    If that's not what you are trying to achieve, please upload a sample workbook with the desired output mocked up manually.

    To attach a sample workbook, click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    02-09-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    5

    Re: Formula to look and modify the data from another cell

    Dear Sir, Thanks for your reply. I tried but it is not met the need.
    As per your instruction, I attached the sample workbook with exact need.
    If it is possible kindly provide me suggestions or solution to solve the
    attached file.

    Thank you
    Attached Files Attached Files

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Formula to look and modify the data from another cell

    Can you explain your requirement based on the sample file you attached? Let me know the steps you would take manually to get the desired output.
    Which column contains the desired output?
    Also, why there are leading spaces in column A and D?

  5. #5
    Registered User
    Join Date
    02-09-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    5

    Re: Formula to look and modify the data from another cell

    Sir the output needs to be in Colum E. I copied the column A to column D, so, if someone downloaded the file then they can directly use the name manager for the two columsns. In column A the leading spaces are occured due to some error. I used trim comment. So, I eliminated the spaces. i.e. Trim(A1) gives the name without any leading spaces. After that If I used the step you provided in your previous reply, i.e. IFERROR(VLOOKUP....), it works nicely. When I tried to nest the formula, Error occurs. I would like to know how we can perform the operations (like eliminate the space infront the text, search for the abbreviated form in the column A, expand the actual name) using a single formula.
    Thank you

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Formula to look and modify the data from another cell

    I don't really follow you,but (as a first step), try:

    =VLOOKUP(D1,$A$1:$B$11,2,FALSE)

    copied down. see sheet.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,432

    Re: Formula to look and modify the data from another cell

    How is Excel supposed to know what the abbreviated forms should expand to? Where is the lookup table?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Formula to look and modify the data from another cell

    Please refer to the attached and let me know if this is what you are trying to achieve.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-09-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    5

    Re: Formula to look and modify the data from another cell

    Thanks sir, it worked properly. But why you used the trim in column D and also in Index formula. I am trying to learn this. But anyhow, the sample sheet what you provided is working perfectly. Thank you very much sir.

  10. #10
    Registered User
    Join Date
    02-09-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    5

    Re: Formula to look and modify the data from another cell

    Thanks Mr. Glenn.
    This is what I need exactly.

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Formula to look and modify the data from another cell

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. Excel 2003 formula - modify one cell, another cell track the modify date
    By baby0596cw in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 11-06-2014, 12:55 PM
  2. How to: Modify formula if certain cell is blank
    By JPWRana in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2013, 08:53 PM
  3. VBA is inserting formula instead of cell data? Modify code, how?
    By ScubaGuy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2013, 10:55 AM
  4. How to modify certain data in cell
    By amisdar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-29-2012, 03:39 AM
  5. Modify formula to not execute if cell contains certain text
    By icets in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-26-2011, 08:59 PM
  6. Modify a cell with a formula
    By DECROMAX in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 12-15-2010, 06:11 PM
  7. cell contains formula cannot modify
    By DRLski in forum Excel General
    Replies: 5
    Last Post: 09-20-2006, 12:31 PM

Tags for this Thread

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