+ Reply to Thread
Results 1 to 15 of 15

If Validation Drop Box Is Blank

  1. #1
    Forum Contributor
    Join Date
    09-26-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    182

    Question If Validation Drop Box Is Blank

    I have 2 validation drop down boxes on my worksheet. The first drop down box (c20)populates the second drop down box (20) which populates cells E20, F20, G20 and I20
    If data in Cell 20 is cleared then other cells become blank instead of showing Ref#
    Last edited by Mooseman60; 12-08-2010 at 10:40 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If Validation Drop Box Is Blank

    You can precede each formula in E20, F20, etc.. with conditional check.

    e.g. =IF(OR(C20="",D2=""),"",your_formula)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,332

    Re: If Validation Drop Box Is Blank

    And your question is?
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Forum Contributor
    Join Date
    09-26-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    182

    Re: If Validation Drop Box Is Blank

    This is the formula currently in Cell F20
    =IF(D20="","",VLOOKUP(D20,INDIRECT(C20&"Lookup"),2,FALSE))

    I have attached my sample workbook

    If you select category in C20 and Product in D20 then clear category in C20 and you will see that the remaining cells are looking for data

    I want these cells to clear as well when i clear C20
    Attached Files Attached Files

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,332

    Re: If Validation Drop Box Is Blank

    See NBVC's response.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,957

    Re: If Validation Drop Box Is Blank

    Perhaps:

    =IF(OR(C20="",D20=""),"",VLOOKUP(D20,INDIRECT(C20&"Lookup"),2,FALSE))

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  7. #7
    Forum Contributor
    Join Date
    09-26-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    182

    Re: If Validation Drop Box Is Blank

    Where do i actually insert your formula

  8. #8
    Forum Contributor
    Join Date
    09-26-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    182

    Re: If Validation Drop Box Is Blank

    That works great now i just need to fix formula in material total and labour total which are both showing #Value!

    =IF(D20="","",E20*G20)

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If Validation Drop Box Is Blank

    You replace the D20="" in your formulas with OR(C20="",D20="")

  10. #10
    Forum Contributor
    Join Date
    09-26-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    182

    Re: If Validation Drop Box Is Blank

    Can you supply the full formula line with your added formula in it

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If Validation Drop Box Is Blank

    See attached.
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    09-26-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    182

    Re: If Validation Drop Box Is Blank

    Thanks for that it works fine my only problem now is when I clear C20 all the cells clear except D20 still show the original selection. is it possible to get that cell to clear as well

  13. #13
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If Validation Drop Box Is Blank

    Not without VBA

  14. #14
    Forum Contributor
    Join Date
    09-26-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    182

    Re: If Validation Drop Box Is Blank

    Ok thanks for yor help. How do you guys remember all this, you are unbelievable. I have only been teaching myself excel for a couple of months looks like it might take me another 10 years to get my head around all these formulas and codes

    Once again thanks for your help

  15. #15
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If Validation Drop Box Is Blank

    Actually, see, we don't remember everything... at least not all at once...

    You can do something with conditional formatting to "hide" column D if column C is blank.

    So try this to see if it suits your needs.

    Select D20:D25 and go to Format|Conditional formatting

    Select Formula Is and enter formula =C20=""

    Then click Format and choose White from Color dropdown in the Font tab.

    Click Ok.

    Now, if you delete/clear anything in C20:C25, the corresponding D20:D25 cell should "clear" also.

    Note: the selected value actually remains, but is not visible....

+ 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