+ Reply to Thread
Results 1 to 7 of 7

How-to? IF(Calculation Result<>#) Show Dropdown List (Data Validation)

  1. #1
    Registered User
    Join Date
    07-16-2009
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    4

    Question How-to? IF(Calculation Result<>#) Show Dropdown List (Data Validation)

    Greetings to all here on the forum;

    I have a spreadsheet that uses vlookup to determine the density of multiple materials based on a table that I create as the data admin, however some materials have several possible densities. Thus my goal is something to the effect of a cell that returns a vlookup value unless the material is one of the ones that has multiple possible density values, in which case I want it to show a dropdown list with the allowable densities.

    Essentially its an "if normal material, return tabulated density, if not, provide a data validation style drop down list".

    You may see attached - this is a simplified representation without any of my macros, hence why it is extremely basic in nature.

    Many many thanks in advance for your assistance!
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How-to? IF(Calculation Result<>#) Show Dropdown List (Data Validation)

    this code does sort of that
    but only if you enter value in col a manualy not with validation(i dont know why thoughwell i do its coz im using 97 should work in 2003)
    Please Login or Register  to view this content.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    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

  3. #3
    Registered User
    Join Date
    07-16-2009
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: How-to? IF(Calculation Result<>#) Show Dropdown List (Data Validation)

    Thanks

    Looks like it should work, but having a problem implementing it

    Ok, first of all I added a named range called "drop" that had the various densities that "C" could be.

    I also added a message box after the If c.Offset(0, -1) = "C" Then
    to let me debug it better, problem is I cannot get this event to trigger. I have confirmed that every time I change the worksheet the code is running, but this particular condition is never true. I have tried entering "C" in column A both via validation and via manually typing, both upper and lower case....

    Any ideas?

    Thanks again

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How-to? IF(Calculation Result<>#) Show Dropdown List (Data Validation)

    nope!
    i ran it again on 2007 and it fired ok on drop down or entering directly
    mind you i had to save the workbook with the code in then close reopen to get it to work.
    i'm posting it in the programming forum to get someone to look.
    Last edited by martindwilson; 07-16-2009 at 07:44 PM.

  5. #5
    Registered User
    Join Date
    07-16-2009
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    4

    Red face Re: How-to? IF(Calculation Result<>#) Show Dropdown List (Data Validation)

    Quote Originally Posted by martindwilson View Post
    nope!
    mind you i had to save the workbook with the code in then close reopen to get it to work.
    This was the ticket - works great now MANY MANY THANKS... I closed then reopened and it worked, I was sort of surprised that this was required, should I not be surprised?

    PS. I am running Excel 2003

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How-to? IF(Calculation Result<>#) Show Dropdown List (Data Validation)

    shg had a look and suggested this alternative which is neater!!
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-16-2009
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: How-to? IF(Calculation Result<>#) Show Dropdown List (Data Validation)

    Excellent, I really appreciate the help folks, my spreadsheet is coming out great!

+ 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