+ Reply to Thread
Results 1 to 40 of 40

VBA: Change text in column if there is updated data on another sheet

  1. #1
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    VBA: Change text in column if there is updated data on another sheet

    I have excel 2 sheets here borrower id is same, I want to replace C column datas, in 1st sheet is original datas so what data is available in C column that datas need to replace in sheet 2 C column. Suppose borrower id is not match then the borrower id is new in sheet 2 means then in sheet 2 the data should not replace it should remain the same as old already it having.

    How will i do this using lookup ?
    Attached Files Attached Files
    Last edited by maddyrafi1987; 03-01-2018 at 02:06 AM.

  2. #2
    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
    79,419

    Re: Lookup Formula

    Please take a moment to re-read forum rule #1 and then amend your thread title to something that better explains your problem. Changing your thread title is not optional, which means you must change it. Thanks!

    • Use concise, accurate thread titles.
    • Your post title should describe your problem, not your anticipated solution.
    • Use terms appropriate to a Google search - poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice tell us nothing.
    • Responding to a request to change your thread title by doing so is mandatory.

    To change a title go to your first post, click EDIT then Go Advanced and change your title.

    No help to be offered, please, until the OP complies with this request.
    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.

  3. #3
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    That's better - thanks.

  4. #4
    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
    79,419

    Re: Lookup Formula

    I'm not clear on the before and after from your sample workbook.

  5. #5
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: Lookup Formula

    the workbook it has 2 sheets it contains borrower id and product type, i need to identify the 2 sheets matched borrower id and replace the data in sheet2 product type from sheet1 borrower id product type

  6. #6
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    Use some highlighting to clarify this in the workbook.

  7. #7
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    Highlighting is Need to replace C column sheet 2 data from sheet 1 using lookup or vlookup. Here common for 02 sheets is Borrower ID
    Last edited by maddyrafi1987; 03-01-2018 at 02:58 AM.

  8. #8
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    Please Help

  9. #9
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    Please be patient!!!

    You have not added any highlighting to the sample workbook. I cannot help because you have not made it clear to me what exactly you want. I am not going to start guessing - I don't have time for that. Sorry!

  10. #10
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    I have highlighted whatever i need to change
    Attached Files Attached Files

  11. #11
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    It's no different - there is no highlighting. I am asking you to use colour to show the cells that you want changing - colour (shade) the before and after cells so that they stand out.

    Whilst it is very clear to you what you want, you are not getting it across to me.

  12. #12
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    I have highlighted common columns in excel sheet1 & 2 and Need to changes column is highlighted with green color
    Attached Files Attached Files

  13. #13
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    You cannot have text and a formula in the same cell. What you appear to want to do is not possible without VBA.

  14. #14
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    This formula is working but i have marked red color. apply this formula in sheet2 product type and see
    =IFERROR(INDEX(Sheet1!$L$2:$L$11,MATCH(Sheet2!$B2,Sheet1!$B$2:$B$11,0)),"")
    Attached Files Attached Files

  15. #15
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    That's because these numbers do not exist in the lookup table, so there is no match:

    Excel 2016 (Windows) 32 bit
    B
    12
    66010811
    13
    66011401
    14
    66011405
    15
    66011406
    16
    66011407
    17
    66011409
    18
    66011410
    19
    66020908
    20
    66020909
    21
    66021201
    Sheet: Sheet2

    I am no nearer to understanding what you are trying to do.

  16. #16
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    Yes these numbers dono't exist in sheet 1 so the product type should be come same as given there it will not change for these numbers

  17. #17
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    I don't understand how you want to match the product type and from where. I am not going to respond again - sorry. We are getting nowhere. I hope someone else understands what you want.

  18. #18
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    My concept is simple, in sheet 1 it has borrower id and product type and sheet 2 also it has the same
    In sheet 2 there is extra borrower id's and product type here my formula is working =IFERROR(INDEX(Sheet1!$L$2:$L$11,MATCH(Sheet2!$B2,Sheet1!$B$2:$B$11,0)),"") but it wont works for extra borrower id's. it shows blank cell but i want there is no change should be happen it remains the old same for product type for new borrower id's

  19. #19
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    Your concept may be simple. You are not explaining it effectively, though.

  20. #20
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    I want to replace the product type column in sheet 2 from sheet 1 using borrower id. I want to replace product type only matched borrower id's only

  21. #21
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    So you keep saying. I still have no idea what this means and you still haven't shown us what you want - there are no expected results in your workbook. I am trying to get you to be clear about your requirements by showing us what you want.

  22. #22
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    i want just replace only matched borrower id's product type column in sheet 2

  23. #23
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    SHOW us what you want!!! Mock it up in the spreadsheet.

  24. #24
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    I have attached my output like this output i need.

    I won't apply formula for Loan No: 11 to 20, if i apply this formula means =IFERROR(INDEX(Sheet1!$L$2:$L$11,MATCH(Sheet2!$B2,Sheet1!$B$2:$B$11,0)),"")
    the Loan No: 11 to 20 it shows blank but i need output what it having the cell already
    Attached Images Attached Images

  25. #25
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    You have not yet responded to post #13 where I told you that you cannot have both text and a formula in a cell. Is that what you are expecting to be able to do? If so, you can't do it with a formula. You will have to use VBA.

  26. #26
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    ok i understood. i think vlookup is possible way for this thats why i post. thanks for your all response

  27. #27
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    Shall I move this to the VBA forum?

  28. #28
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    No, pls close this thread, because i don't know basics of VBA also

  29. #29
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    The thread will not be closed, but you can mark it as solved if you have no further use for it.

  30. #30
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    I need formula for true false condition, i need syntax for this: if true means this formula should be valid =IFERROR(INDEX(Sheet1!$L$2:$L$11,MATCH(Sheet2!$B2,Sheet1!$B$2:$B$11,0)),"") otherwise it want to skip the cell in the cell the formula wont apply there. give me syntax. if it possible ?

  31. #31
    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
    79,419

    Re: In 2 Sheets Replacing Column Datas Using Lookup Formula

    I have already explained that it is not possible without VBA. You cannot have both text and a formula in a cell: it's one or the other.

    I am moving this thread to the VBA section so that you can hopefully get the help you need. I've also updated the title to try and better explain what you want.
    Last edited by AliGW; 03-02-2018 at 01:52 AM.

  32. #32
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: VBA: Change text in column if there is updated data on another sheet

    This should do it.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  33. #33
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: VBA: Change text in column if there is updated data on another sheet

    pls workout and send the worksheet or send step procedure that how and where can i paste it this formula in vba ?

  34. #34
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241

    Re: VBA: Change text in column if there is updated data on another sheet

    Please Login or Register  to view this content.
    Last edited by daboho; 03-02-2018 at 03:49 AM.
    "ThankyouFor Attention * And Your Help!!"

  35. #35
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: VBA: Change text in column if there is updated data on another sheet

    it is right but it was taking wrong column... borrower id is B and Product type is L col. but here sheet 2 it shows borrower name. see the screenshot
    Attached Images Attached Images
    Last edited by maddyrafi1987; 03-02-2018 at 10:32 AM.

  36. #36
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241

    Re: VBA: Change text in column if there is updated data on another sheet

    'change this
    Please Login or Register  to view this content.

  37. #37
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: VBA: Change text in column if there is updated data on another sheet

    this formula is not working anything, it will not happening anything

  38. #38
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: VBA: Change text in column if there is updated data on another sheet

    Like this.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by bakerman2; 03-03-2018 at 02:39 AM.

  39. #39
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Madurai
    MS-Off Ver
    2016
    Posts
    239

    Re: VBA: Change text in column if there is updated data on another sheet

    It is possible in Excel, I have take copy sheet2 to sheet3 and i workout this formula is worked good =IFERROR(INDEX(Sheet1!$O$2:$O$200000,MATCH(Sheet2!B2,Sheet1!$B$2:$B$200000,0)),Sheet2!O2) thanks for all, pls close this thread, thanks for all

  40. #40
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: VBA: Change text in column if there is updated data on another sheet

    To close the thread select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

    Glad to help. Thanks for rep+.
    Last edited by bakerman2; 03-03-2018 at 09:59 AM.

+ 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] Data validation lists change source designation when list data is updated.
    By frenurks in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-28-2015, 06:52 AM
  2. way to auto change data range when query is updated?
    By gorcorps in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 12-13-2013, 02:15 PM
  3. Status column does not change when updated
    By Puggwash63 in forum Excel General
    Replies: 0
    Last Post: 10-20-2013, 07:09 AM
  4. Formulas change when data is updated
    By kazbear in forum Excel General
    Replies: 0
    Last Post: 02-10-2010, 10:49 AM
  5. Rev. Auto Updated when sheet is updated and or entire book
    By frankee_gee in forum Excel General
    Replies: 1
    Last Post: 04-07-2008, 05:05 PM
  6. measuring time between Change and Sheet Updated
    By lalbatros in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2007, 10:39 AM
  7. display last cell in a column as the sheet is updated
    By Marc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-17-2006, 05:15 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