+ Reply to Thread
Results 1 to 5 of 5

Code to loop through a column and change cell value based on list

  1. #1
    Registered User
    Join Date
    05-05-2011
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    18

    Code to loop through a column and change cell value based on list

    See attachment. Column B has values that need to be updated based on a list of conversion data. I need code to loop through column B, search that value against a table on the conversion list tab, and update each cell to the new value. if the value in column B does not have a match in the list, return "-"

    Can be done?
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-05-2011
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Code to loop through a column and change cell value based on list

    Correction, If there is no matching value in the conversion table, it should leave the original value as-is

  3. #3
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Code to loop through a column and change cell value based on list

    Hello,

    Please find working example in attached file.

    My solution is
    Please Login or Register  to view this content.
    Best Regards
    MaczaQ
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    08-29-2011
    Location
    Mississauga, CANADA
    MS-Off Ver
    Excel 2010
    Posts
    503

    Re: Code to loop through a column and change cell value based on list

    try this and if so, mark the thread as SOLVED

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Code to loop through a column and change cell value based on list

    hi, davekippen, please check attachment, run code "test"
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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