vbaexcel

Excel drop down list to convert full name & enter Abbreviations


I have a database called Overtime with a second sheet called data. On the first sheet I am using data validation to access the data list on the data page. At present The list has peoples full names. What I want to do is when a name is selected it then changes it to the Initials from the Data sheet. Not sure if this can be done into the one cell, or to use something like Vlookup to enter the initials into an adjacent cell. The names and Initials are on the same rows on the data page (in columns "I" & "J"). On the main database the validation list is for column "O". I have a column "P" ready to put in the formula to show the initials if this the only way it can be done.


Solution

  • With data in the Data sheet like:

    enter image description here

    In P1 enter:

    =IF(OR(O1="",NOT(ISNUMBER(MATCH(O1,Data!I:I,0)))),"",VLOOKUP(O1,Data!I:J,2,FALSE))
    

    and copy down.