+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Formula Overriding Data Validation

  1. #1
    Registered User
    Join Date
    06-05-2009
    Location
    Northern Michiagn, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Formula Overriding Data Validation

    Hello to all of you.
    Wasn't sure how to TITLE this Thread / Question.

    I'm working on a Worksheet that I have a Data Validation in Cell B3 ( etc through that column ) that gives a Drop Down Menu of Choices...ex. NAMES.

    What I need is if cell F3 is not equal to 0.... ( <>0 ) then the "name" listed in cell B3 is then returned to an empty (Blank) value...for lack of better words...

    anyways...once info has expired its time...and F3 has been deleted..then the B3 data Validation ( NAME ) is zeroed out...is this possible? I have been trying all kinds of =IF , =if(AND( ...etc...but as soon as I add a formula to a cell that contains the Data Validation...the Data Validation is over-riden

    Thank you for your time...

    -Martin
    Last edited by MacroMartin; 08-10-2009 at 04:52 PM.

  2. #2
    Registered User
    Join Date
    06-05-2009
    Location
    Northern Michiagn, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Formula Overriding Data Validation

    So if I delete F3 then the name from the Data validation in B3 returns an empty value...as to start over....

    ...

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Formula Overriding Data Validation

    What I need is if cell F3 is not equal to 0.... ( <>0 ) then the "name" listed in cell B3 is then returned to an empty (Blank) value...for lack of better words..
    anyways...once info has expired its time...and F3 has been deleted..then the B3 data Validation ( NAME ) is zeroed out...is this possible?
    Values in cells with Data Validation cannot be updated based on results of another cell. If you want to clear the value from a data validation cell you will need to use VBA.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Formula Overriding Data Validation

    You can have a formula and a DV in the same cell, but you have to enter the formula first before applying the DV to the cell. The formula will be able to display anything it's formula calls for, regardless of the DV, but if you USE the drop box option and make a selection, the formula is permanently removed and replaced by your selection.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    06-05-2009
    Location
    Northern Michiagn, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Formula Overriding Data Validation

    Thank you for the replys...

    Is this this the correct way to write the VBA?

    Sub Clear_All()
    If Range("F3:F15") <>"0"
    Then
    Range ("B3:B15").ClearContents
    End Sub


    Thank you for your time.

    -Martin :-)

  6. #6
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Formula Overriding Data Validation

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-05-2009
    Location
    Northern Michiagn, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Formula Overriding Data Validation

    Thank you very much. I was able to get that to work.

    I did need to change the

    Please Login or Register  to view this content.
    To

    Please Login or Register  to view this content.
    Anyway I can make this run automatically without the use of a button?



    Oh..and is the .clearContents Range the same value as whats given for Column F?

    Thank you very much for your time.

    -Martin :-)
    Last edited by MacroMartin; 08-10-2009 at 04:38 PM.

  8. #8
    Registered User
    Join Date
    06-05-2009
    Location
    Northern Michiagn, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Formula Overriding Data Validation

    I got this to work if this answers one of my questions. From my previous reply

    Is this written correctly?

    Please Login or Register  to view this content.
    This will clear Column B,A & H

    Please note I purposly omitted some of the code you supplied...
    Last edited by MacroMartin; 08-10-2009 at 04:23 PM.

+ 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