+ Reply to Thread
Results 1 to 9 of 9

VBA modification to exclude empty cells, just need help implementing!!

  1. #1
    Registered User
    Join Date
    06-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Exclamation VBA modification to exclude empty cells, just need help implementing!!

    I have a VBA that pulls Unique values from a set of cells. My problem is that I do not want it to include empty cells as a unique cell, it currently treats the empty cells as unique and gives me back a "0". Below I have my VBA, also someone tried to help me with a modification that would ignore empty cells but I haven't been able to modify it correctly so if anyone could help me with this I would be deeply appreciative.

    Note: I have highlighted in blue the area where I tried to input the modification code, if anyone understands VBA and knows how to incorporate the code in purple into the code in blue correctly it would solve my problem!
    VBA:

    Please Login or Register  to view this content.
    Below is the Code given to me by other person, I was told to place this into the blue colored code above, but it didn't work :/

    Please Login or Register  to view this content.
    Last edited by cronerd; 07-09-2013 at 12:07 PM.

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: VBA modification to exclude empty cells, just need help implementing!!

    Please put your code in code brackets. Click edit post, highlight the code and press the #.

    On another note the yellow is nearly impossible to read on my screen.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    06-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: VBA modification to exclude empty cells, just need help implementing!!

    Fixed! thanks XeRo Solus!

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA modification to exclude empty cells, just need help implementing!!

    You can use the len function to exclude the null.


    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA modification to exclude empty cells, just need help implementing!!

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: VBA modification to exclude empty cells, just need help implementing!!

    would I then replace it with the entire blue part of the code? what happens to the myColl.Remore "String" section?

  7. #7
    Registered User
    Join Date
    06-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: VBA modification to exclude empty cells, just need help implementing!!

    Think I got it! Like this?

    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA modification to exclude empty cells, just need help implementing!!

    It remains there.
    I have just added to you existing line to exclude null string.

  9. #9
    Registered User
    Join Date
    06-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: VBA modification to exclude empty cells, just need help implementing!!

    Thanks for helping me through that!! Case solved.

+ 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