+ Reply to Thread
Results 1 to 10 of 10

Change Original value inside Vlookup

  1. #1
    Forum Contributor
    Join Date
    11-01-2018
    Location
    England
    MS-Off Ver
    2016
    Posts
    280

    Change Original value inside Vlookup

    In cells E1:F10 is some data
    In Column E is a product code
    In Column F is a product description matching the product code next to it

    In Cell A1 I will need to input the product code and in Cell B1 the vlookup data will be returning the product description.

    Is it possible to the following:
    Replace the original values inside the vlookup cell (B1).

    Imagine I search the code in Cell A1
    ...
    Inside B1 vlookup data finds that product code in column E and returns its product desc. from column F
    ...
    Now change that found value to something else inside cell B1, if not then inside B2.

    I have attached a sample workbook

    Thank you
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Change Original value inside Vlookup

    Are you saying that you give a code, a formula looks up the corresponding description, you want to type in a different description, and then have that description updated in column F?

    If that's it, it is possible but it requires VBA. That's the only way to change a cell that has a value instead of a formula.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Change Original value inside Vlookup

    It is not 100% clear what you want to achieve. Do you want to:

    ... Now change that found value to something else inside cell B1, if not then inside B2. And this causes change of value in F10 so next time 0010101OL is written in A1 this new value will show in B1.

    If you need something like it, formulas wouldn't help. You need to use VBA for that
    Let's say you want to input replacement in B2 (will be easier, because you do not destroy formula in B1 this way).

    Rightclick on your worksheet tab, select edit code from popup menu and paste such code:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best Regards,

    Kaper

  4. #4
    Forum Contributor
    Join Date
    11-01-2018
    Location
    England
    MS-Off Ver
    2016
    Posts
    280

    Re: Change Original value inside Vlookup

    Hi Kaper,

    You have exactly what I need.
    If I have multiple codes in column A (e.g. A1:A10) and multiple desc. showing in column B. In Column C id like to have that VBA code, for each cell, instead of just B2, this will allow me to change multiple descriptions.

    Thank you

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Change Original value inside Vlookup

    Use Cell C1:C10 as helper column.
    worksheet event code.

    Please Login or Register  to view this content.
    To paste the code
    Right click of sheet tab
    Select--> View Code
    Paste the code.
    Close window
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 11-02-2018 at 08:03 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Forum Contributor
    Join Date
    11-01-2018
    Location
    England
    MS-Off Ver
    2016
    Posts
    280

    Re: Change Original value inside Vlookup

    Everything works now, thank you once again.
    Last edited by Eduards; 11-02-2018 at 08:50 AM.

  7. #7
    Registered User
    Join Date
    09-09-2022
    Location
    Richmond, Virginia
    MS-Off Ver
    365
    Posts
    4

    Re: Change Original value inside Vlookup

    Hi there, apologies to resurrect a dead thread, but I am attempting to use the latest code from kvsrinivasamurthy, except I am attempting to make the changes to a table on a separate sheet. I ended up changing the code to what I've pasted below, but it doesn't seem to work at all for me. Can anyone help me figur e

    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by 6StringJazzer; 01-14-2023 at 11:31 AM.

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Change Original value inside Vlookup

    PL upload the file.

  9. #9
    Registered User
    Join Date
    09-09-2022
    Location
    Richmond, Virginia
    MS-Off Ver
    365
    Posts
    4

    Re: Change Original value inside Vlookup

    Hi, thanks for the quick reply, here is the file.
    Attached Files Attached Files

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Change Original value inside Vlookup

    Quote Originally Posted by kls1022 View Post
    Hi, thanks for the quick reply, here is the file.
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. [SOLVED] Capturing the original change made to a cell
    By JimDandy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2018, 09:59 AM
  2. A Macro that will do the following and not change the original cells
    By bfarinella in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2017, 05:27 PM
  3. [SOLVED] Change a truncated hyperlink back to its original name
    By mellenbal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2016, 03:00 PM
  4. [SOLVED] Macro change the format need to keep original
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-27-2014, 08:09 AM
  5. [SOLVED] Copied formulas change original lacation
    By jb1konobe in forum Excel General
    Replies: 4
    Last Post: 11-30-2013, 06:18 AM
  6. Replies: 1
    Last Post: 10-02-2012, 04:27 PM
  7. [SOLVED] making copied cells change with change in original cell
    By Jennifer Mcdermeit in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-20-2006, 11:58 AM

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