+ Reply to Thread
Results 1 to 5 of 5

Skipping blank cells in a list to create an uninterrupted list

  1. #1
    Registered User
    Join Date
    10-01-2007
    Posts
    6

    Skipping blank cells in a list to create an uninterrupted list

    Calling all gurus!

    Purpose: a drop-down box with no blanks between selections

    Detail: I am trying to create an uninterrupted (no blank cells) list based on a list with intermittent blank cells.

    Question: What formula (no VBA please) could I use to grab in sequence, data, without grabbing the blank cells?

    Example:

    (1) List (this list will dynamically change based on previous selections)
    Apples
    Oranges

    Bananas

    Cherries
    Strawberries

    Honey Dew

    (2) I want it to read:
    Apples
    Oranges
    Bananas
    Cherries
    Strawberries
    Honey Dew

    So that I can link this list to a drop-down for a seamless list.

    Hope this helps - let me know if you need more details! Thanks!

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Take a look at the example on this link to see if it helps

    Flexible Item List


    It uses an array formula
    =IF(SUMPRODUCT((rngUserInput<>"")*ISERROR(MATCH(rngUserInput,$B$2:B2,0)))<>0,INDEX(rngUserInput,MATCH(TRUE,ISERROR(IF(ISBLANK(rngUserInput),FALSE,MATCH(rngUserInput,$B$2:$B2,0))),0),1),"")
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    10-01-2007
    Posts
    6

    Giving it a try

    Thank you guru. An ingenious formula ... I tried it and everything seemed to work perfectly except at the top of my uninterrupted list is a blank cell that I cannot seem to git rid of even thought the formula:=IF(SUMPRODUCT((rngUserInput<>"")*ISERROR(MATCH(rngUserInput,$B$2:B2,0)))<>0,INDEX(rngUserInput,MATCH(TRUE,ISERROR(IF(ISBLANK(rngUserInput),FALSE,MATCH(rngUserInput,$B$2:$B2,0))),0),1),"")
    is there ... all the other cells below the first cell work just great.

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Try changing the references in the named ranges

    =InputSheet!$B$1:INDEX(InputSheet!$B:$B,COUNTIF(InputSheet!$B:$B,"?*")+COUNT(InputSheet!$B:$B),1)

    =InputSheet!$D$1:$D$20
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  5. #5
    Registered User
    Join Date
    10-01-2007
    Posts
    6

    Input cells that are formulas are an issue and data validation does not work

    Thanks for all your help thus far!

    (1) In the link I was directed towards: http://www.contextures.com/excelfiles.html#DataVal

    it identifies two columns, input and ouput (the output is for the data validation list). The input feeds just fine into the ouput when the user selects unique numbers BUT if the cells in the input column are formulas then for some reason the ouput column includes at least one blank even though the formulas' purpose is to add only unique entries and remove all blanks. I can't figure this out.

    (2) My formula for the named range does not seem to work - I continue to get this error message: "The Source currently evaluates to an error. Do you wish to continue?" and clicking OK gives me a list that has no content.

    ANY help would be AWESOME! Thanks!!

+ 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