+ Reply to Thread
Results 1 to 3 of 3

Need VBA code to use a data validation list

  1. #1
    Registered User
    Join Date
    08-07-2008
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    5

    Smile Need VBA code to use a data validation list

    I have cell B9 which uses the Data Validation List function but before the user enters his selection in this cell, cell C8 must be populated with a value.

    Ideally I want Cell B9 to display the list of names but only allow this selection to be entered if Cell C8 has a value in it, if no entry in Cell C8 then a warning message box pops up informing the user to enter their margin first.

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Need VBA code to use a data validation list

    Pl see the attachment.Worksheet_SelectionChange(ByVal Target As Range) is used in Sheet1.
    Any clarifications welcome.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 02-21-2012 at 07:29 AM.

  3. #3
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Need VBA code to use a data validation list

    Use data validation with a type of list and a formuls similar to

    =IF($C$8<>"",$A$1:$A$9)

+ 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