+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    07-01-2009
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Smile DropDown lists and validation help

    I have the following fields: colA & colB
    the total of the two columns must equal 5 or less.

    because I want to restrict the entry into these to columns, is there a way that I can have colA have a dropdown list of 1 through 5 and then when someone selects 2, colB will only show 1 to 3 available?

  2. #2
    Forum Guru zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    5,740

    Re: DropDown lists and validation help

    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Forum Guru sweep's Avatar
    Join Date
    04-03-2007
    Location
    Location: Location:
    MS-Off Ver
    XL2003 / 2007
    Posts
    2,448

    Re: DropDown lists and validation help

    Or you can enter in a list of cells (for example K1:K5) 1,2,3,4,5

    Define the range as a named range (for example "options")

    Presuming your 1st set of data is in column A, select column B and define the custom validation like so:

    =OFFSET(options,0,0,5-$A1,1)
    Sarcasm - because beating the **** out of someone is illegal.

  4. #4
    Registered User
    Join Date
    06-15-2009
    Location
    Hong Kong, CN
    MS-Off Ver
    Excel 97-2010
    Posts
    17

    Re: DropDown lists and validation help

    Hi Cappy,
    Please check the attached excel,
    Sheet1:
    A1: Col A
    B1: Col B
    Sheet2:
    A1:A5 a list of item,visible according to entry in col B1 of Sheet 1
    b1:B5 a list of item,visible according to entry in col A1 of Sheet 1
    Attached Files Attached Files
    We build a new way to dream
    http://kimbalko.blogspot.com

  5. #5
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,477

    Re: DropDown lists and validation help

    if you're just limiting a1 against b1 then a2 aginst b2 and so on
    then in a1 use data/validation/custom and put
    =OR($A1+$B1<5,$A1+$B1=5) in the formula box
    trhen click on input message and error alert tabs an put in some suitable message on each
    click ok
    copy/paste special "validation" to to cells in range A1:B?
    now you wont be able to put in a total that is >5
    (note as with any validation if someone pastes into cell it will override validation any way)
    Last edited by martindwilson; 07-01-2009 at 07:54 AM.
    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

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.2.0