+ Reply to Thread
Results 1 to 5 of 5

VBA change cell rule from list to range

  1. #1
    Registered User
    Join Date
    12-12-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    VBA change cell rule from list to range

    Hi,

    I would like to know if it's possible to change a cell in excel from a list to ranged cell, depending on another cell.
    For example, in case cell A1 have a value "X" then Cell B1 will be from type list.
    in case cell A1 have a value "Y" then Cell B1 will be from type ranged cell.

    Is this possible to do on excel 2010 ?

    Thanks !

  2. #2
    Forum Contributor
    Join Date
    08-21-2008
    Location
    Hamilton, New Zealand
    MS-Off Ver
    Office 2007
    Posts
    255

    Re: VBA change cell rule from list to range

    Do you mean you want the data validation list for cell B1 if A1 = X to be from a list (eg. good, bad, ugly - possibly a named range = MyList) and data validation list for cell B1 if A1 = Y to be based on a cell range (eg C1:C5) ?

  3. #3
    Registered User
    Join Date
    12-12-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: VBA change cell rule from list to range

    Thanks for your answer.
    Yes - for the list part, but regarding the "ranged cell" I meant for a regular cell.
    Meaning, I have a cell#1 that depends on cell#2 value, cell#1 is a list or a regular cell.

    Thanks.

  4. #4
    Forum Contributor
    Join Date
    08-21-2008
    Location
    Hamilton, New Zealand
    MS-Off Ver
    Office 2007
    Posts
    255

    Re: VBA change cell rule from list to range

    If I understand your requirements I think you are after Dependant Data Validation see here for something that may help

  5. #5
    Registered User
    Join Date
    12-12-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: VBA change cell rule from list to range

    That's part of what I've meant.
    Supposed I have 2 cells A1 and B1 and A1 is a list of values.
    What I want to have is:
    1. In case "X" is chosen from the list in A1, then to have B1 act as a list of other values.
    The solution to this can be done, as you suggested, with dependent list.

    2. In case "Y" is chosen from the list in A1, then to have B1 act as a regular cell,
    meaning that the user can enter values manually and not to choose them from a list.

    Thanks.

+ 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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1