+ Reply to Thread
Results 1 to 16 of 16

Data validation problem

  1. #1
    Registered User
    Join Date
    07-11-2016
    Location
    Finland
    MS-Off Ver
    2013
    Posts
    21

    Data validation problem

    Hi,

    Can some body help me

    I want to make a Data validation list that gives a list of countries,
    is it possibal to get the value (country) to change to the shortening in the same cell.

    For excample, in cell A1 i choose country Sweden, so in sted of writing sweeden in cell A1, excel gives the answer SWE.

  2. #2
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Data validation problem

    Why can't you change the list to show Sweden as SWE ???
    Ash

  3. #3
    Registered User
    Join Date
    07-11-2016
    Location
    Finland
    MS-Off Ver
    2013
    Posts
    21

    Re: Data validation problem

    because i have over 50 different countries and several people using the document.
    So i when you choose a country it gives the shortening as answer,

    if one guy shortens swe as something else then i get a problem with the following function

  4. #4
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Data validation problem

    can you share your file please.............remove any sensitive data

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Data validation problem

    Do you always want it shortened to 3 characters, or could it be variable?

  6. #6
    Registered User
    Join Date
    07-11-2016
    Location
    Finland
    MS-Off Ver
    2013
    Posts
    21

    Re: Data validation problem

    Here is the problem in a small scale

    In the table in column A i want a list with countries, from A14-A19
    But instead of giving the complete name i want to give the short version from cells B14-B19

    Then in column B i use index and match to look which continent the country is located in.

    As an excample

    In sell A6 i choose from the list russia
    but the anser in cell A6 should bee RUS not russia
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-11-2016
    Location
    Finland
    MS-Off Ver
    2013
    Posts
    21

    Re: Data validation problem

    it can be variable,
    i got a list of countries and next to them the shortening

    so if it would be possible to get data validation list in one cell and a index match in the same cell to find the shortening, that would be great

  8. #8
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Data validation problem

    Does adding a column work for you?

  9. #9
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Data validation problem

    Please check
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Data validation problem

    See if this helps.

    A bit of visual deception using a little bit of vba (macro) code and a hidden column.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    07-11-2016
    Location
    Finland
    MS-Off Ver
    2013
    Posts
    21

    Re: Data validation problem

    exactly like that jason.b75
    but when you open the list of countries its hard to reed because the list is very narrow can you widen it some how

  12. #12
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Data validation problem

    Oops.

    I forgot to check it after hiding the column.

    It can only be made wider by unhiding the hidden column, which would defeat the purpose.

    Common method would be to overlay the cells with comboboxes, but I'm going to try some alternatives and see which one works.

  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
    80,430

    Re: Data validation problem

    Quote Originally Posted by jason.b75 View Post
    It can only be made wider by unhiding the hidden column, which would defeat the purpose.

    Common method would be to overlay the cells with comboboxes, but I'm going to try some alternatives and see which one works.
    Instead of hiding the column, the cells could be locked and the text formatted white - would that work?
    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.

  14. #14
    Registered User
    Join Date
    07-11-2016
    Location
    Finland
    MS-Off Ver
    2013
    Posts
    21

    Re: Data validation problem

    Quote Originally Posted by jason.b75 View Post
    Oops.

    I forgot to check it after hiding the column.

    It can only be made wider by unhiding the hidden column, which would defeat the purpose.

    Common method would be to overlay the cells with comboboxes, but I'm going to try some alternatives and see which one works.
    but if we switch the hidden column on the left side and the column with the shortening to the right would it work

    By the way can you tell how the VBA code works, i like to learn more about VBA

  15. #15
    Registered User
    Join Date
    07-11-2016
    Location
    Finland
    MS-Off Ver
    2013
    Posts
    21

    Re: Data validation problem

    the formula works if you flip the rows

    But how do i duplicate the formula so that it does the same thing in a other column,

    I have tried to change the name and SelectionChange and target but it doesn't work

  16. #16
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Data validation problem

    That could work, I was trying a different approach to keep it in the same column.

    Does this work for you?
    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)

Similar Threads

  1. [SOLVED] data validation problem
    By mukeshbaviskar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-16-2013, 12:10 PM
  2. Data validation problem
    By PedroSousa in forum Excel General
    Replies: 5
    Last Post: 12-13-2012, 08:48 PM
  3. Data validation list multiple options problem when entering none validated data
    By ThomasCarter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-02-2012, 05:53 AM
  4. Data validation problem
    By gary260172 in forum Excel General
    Replies: 2
    Last Post: 01-15-2010, 12:56 PM
  5. [SOLVED] RE: Data Validation problem
    By Toppers in forum Excel General
    Replies: 0
    Last Post: 08-21-2006, 06:05 AM
  6. Pl help to fix this problem - Data validation
    By tamilan in forum Excel General
    Replies: 3
    Last Post: 05-31-2006, 11:16 AM
  7. Data validation problem
    By Peter1999 in forum Excel General
    Replies: 3
    Last Post: 05-22-2006, 04:18 AM
  8. Data validation problem
    By broogle in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-02-2005, 11:05 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