+ Reply to Thread
Results 1 to 7 of 7

Data Validation Using Target.Value

  1. #1
    Registered User
    Join Date
    02-20-2012
    Location
    Austin
    MS-Off Ver
    Excel 2010
    Posts
    26

    Data Validation Using Target.Value

    I am trying to get a data validation using vba. I can not seem to get the below code correct. I have posted part of the code below. I am wanting use the Match function to look at the Target Value. I am having trouble on this line "CHOOSE(MATCH(Target.Value,Categories,0),Column1,Column2)" The code language on Target.Value reads an error.
    An example would be if cell A1 reads the word Red then add the data validation list Column1. Red is the first index in the Categories list.

    copy to clipboard
    Please Login or Register  to view this content.

  2. #2
    Forum Guru davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    XL 2003,2010,2013
    Posts
    7,589

    Re: Data Validation Using Target.Value

    You may have to supply a sample workbook so somebody can see what the problem is.

  3. #3
    Registered User
    Join Date
    02-20-2012
    Location
    Austin
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Data Validation Using Target.Value

    I have attached an example program. Just a note where it says Formula1:="=CHOOSE(MATCH(A2,Categories,0),Column1,Column2)" the A2 should read the target.value which is A2. When the program runs it should look at the value in Column A within the same row. Example if A15 has a value the formula would read Formula1:="=CHOOSE(MATCH(15,Categories,0),Column1,Column2)"

    Program is also here to.

    copy to clipboard
    Please Login or Register  to view this content.
    copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-20-2012
    Location
    Austin
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Data Validation Using Target.Value

    Any suggestions?

  5. #5
    Forum Guru
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2003
    Posts
    4,006

    Re: Data Validation Using Target.Value

    hi nalgene5622, try this

    copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-20-2012
    Location
    Austin
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Data Validation Using Target.Value

    Watersev,

    Thanks for the help that is exactly what I needed.

  7. #7
    Forum Guru
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2003
    Posts
    4,006

    Re: Data Validation Using Target.Value

    if your issue is Solved: Select Thread Tools (on top of your 1st post) -> Mark this thread as Solved.

+ 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