+ Reply to Thread
Results 1 to 18 of 18

Remove Blanks from Data Validation

  1. #1
    Registered User
    Join Date
    09-09-2010
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    7

    Remove Blanks from Data Validation

    Im having trouble removing blanks from a data validation list.

    I have two worksheets, Materials and Prices.

    On the materials page I have I have groups of items, which are all given defined names, theres around 10 groups of materials, all with about 10 or so items in each group of material.

    On the Prices page, I have two combo boxes, the first selects the type of material using simple validation, the second displays the items within that type of material using the following formula;

    =INDIRECT(B7)
    Ive ensured ive ticked the box to ignore the blanks on both sets of data valdiation, but still displays the blanks.

    When opening the second drop down box, because the defined name is in a range (i.e =Materials!$A$1036:$A$1065 ) it will also display the blanks.

    Can anyone offer any advice on how to get around the blanks?
    Last edited by barteh; 09-09-2010 at 10:49 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: Remove Blanks from Data Validation

    You mean you have blanks at the bottom of the list? If so, you will need to use a dynamic named range...

    See the last section here: http://www.contextures.com/xlnames01.html
    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
    Registered User
    Join Date
    09-09-2010
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Remove Blanks from Data Validation

    Hi NBVC, thanks for your quick reply!

    Yes there are blank cells within my named range, but there are blanks between the used cells.

    For example, within the named ranged, cells which might be occupied with a value are A1,A3,A4,A6,A7.

    I would ideally be looking to erradicate the blanks between?

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

    Re: Remove Blanks from Data Validation

    You can't remove those unless you create a separate list that removes the blanks and then point to that list for a named range.

  5. #5
    Registered User
    Join Date
    09-09-2010
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Remove Blanks from Data Validation

    I see.
    Ive removed the spaces between the cells and will try to work around this.
    Im looking at creating a dynamic list which automatically removes spaces after the last cell with text, so far I have

    =OFFSET(Materials!$A$1140,0,0,MATCH("*",Materials!$A:$A,-1),1)
    but this is not working.

    The cells of data are between A1140 and A1169.
    Can you spot any obvious mistakes?

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

    Re: Remove Blanks from Data Validation

    How is it not working?

    Is the list beginning at A1140?

  7. #7
    Registered User
    Join Date
    09-09-2010
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Remove Blanks from Data Validation

    The range of items in the list start from A1140 to A1170 and Ive created a name for this list.
    On a seperate worksheet (called Prices in cell B1), I have a data validation which calls that name.

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

    Re: Remove Blanks from Data Validation

    Try then:

    =OFFSET(Materials!$A$1140,0,0,MATCH("*",Materials!$A$1140:$A$1170,-1),1)

    or

    =OFFSET(Materials!$A$1140,0,0,COUNTA(Materials!$A$1140:$A$1170),1)

  9. #9
    Registered User
    Join Date
    09-09-2010
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Remove Blanks from Data Validation

    both of the above doesnt allow the drop down combo box to open :/

  10. #10
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Remove Blanks from Data Validation

    Hi, Take a look at attachment. 1st sheet. Eliminate blanks...
    Attached Files Attached Files
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

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

    Re: Remove Blanks from Data Validation

    In the validation did you enter the source for the list as:

    =List

    where List is the name of the dynamic named range?

  12. #12
    Registered User
    Join Date
    09-09-2010
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Remove Blanks from Data Validation

    it might be easier to attached + explain.

    A material list + prices is shown on worksheet 'Materials'.

    On the prices worksheet (PS1), the first drop down menu is of a data validation (pulling names from the list at the bottom of the materials page).
    The second combo box is using the formula

    =INDIRECT(Cell_Ref)
    The names in the data validation are the same as the defined names which is how I get the 2 step combo boxes (this is working fine except the blanks).


    On the attachment, the name range I have been playing around with trying the above formulas is called Davis_Derby_Equipment.

    I think the attached should make sense?
    Attached Files Attached Files

  13. #13
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Remove Blanks from Data Validation

    Highlight C7:C29 and go to Data > Validation
    Use below stated formula

    =OFFSET(INDIRECT(ADDRESS(ROW(INDIRECT(B7)),1,,,"Materials")),,,COUNTA(INDIRECT(B7)))

  14. #14
    Registered User
    Join Date
    09-09-2010
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Remove Blanks from Data Validation

    Works like a charm, thanks very both to both of you for your help, very kind of you

  15. #15
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Remove Blanks from Data Validation

    Would you like to mark your thread as solved?

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

    Re: Remove Blanks from Data Validation

    Also have a look here:

    http://www.contextures.com/xldataval02.html

    Section called "Using Dynamic Lists"

  17. #17
    Registered User
    Join Date
    02-11-2011
    Location
    Petoskey, MI
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Remove Blanks from Data Validation

    I have the same issue, however I have formulas that calculate to "". But because there is a formula in it... it see it as SOMETHING and the ISBLANK passes the "blank" across. Is there a way to strip out formulas that calculate to a certain value?

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

    Re: Remove Blanks from Data Validation

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

+ 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