+ Reply to Thread
Results 1 to 4 of 4

Formatting a Cell based on a lookup table

  1. #1
    Registered User
    Join Date
    06-30-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Formatting a Cell based on a lookup table

    Hi,
    I am looking for a solution to this problem, which I think is pretty challenging. (Ideally I would like to have it sorted out without VBA or the least amount of code)

    I have a lookup table like this

    CityID City
    1 London
    2 Rome
    3 Venice
    4 Paris
    ...
    ....

    1) Part 1

    if cell A1 contains =2, the cell will display Rome,
    if cell A2 contains =4, the cell will display Paris and so on
    This of course should be only for a fixed Range of cell.

    2) Part 2
    I would like to have for each cell a combo box that (kind of Validation List)

    Combo box displays Rome, Cell Value = 2
    Combo box displays Venice, Cell Value = 3


    Thanks

    arguros

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523

    Re: Formatting a Cell based on a lookup table

    Yes vlookup would be the way to go
    http://www.freewebs.com/davesexcel/V...20Example2.xls

  3. #3
    Registered User
    Join Date
    06-30-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Formatting a Cell based on a lookup table

    Hi,
    the Vlookup does not do what I would like to.
    I just want to insert 1 in the cell have the very same cell show "London"

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523

    VBA Vlookup with WorksheetChange

    This would require VBA. Check out this example, Right click on the Sheet tab and select View Code to see the code.
    The data is in The Data Sheet.
    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)

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