+ Reply to Thread
Results 1 to 10 of 10

Select non-empty cell range with VBA

  1. #1
    Registered User
    Join Date
    10-11-2013
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    20

    Select non-empty cell range with VBA

    Hello,

    First of all i want to thank the people that helped me with my previous question.

    I would like to ask for help with the following issue - i have three columns that look like this:
    1.png
    Which should have a selection around them like this:
    2.png

    The macro should ignore rows that do not contain values in all of the three columns.

    Unfortunately i do not know VBA, i have searched for this issue on Google and found some information but i cannot put them together.
    For exemple:
    http://www.mrexcel.com/archive/VBA/21407.html
    http://stackoverflow.com/questions/8...excel-with-vba

    Thank you for your time.
    Daniel.
    issue2.xlsm
    Attached Images Attached Images
    Last edited by mexykanu; 12-09-2013 at 10:24 AM. Reason: Solved!

  2. #2
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Select non-empty cell range with VBA

    Try following code..
    Please Login or Register  to view this content.
    Sub DontForgetThese()
         If Your thread includes any code Then Please use code tags...
         If Your thread has been solved Then Please mark as solved...
         If Anybody has helped to you Then Please add reputation...
    End Sub

  3. #3
    Registered User
    Join Date
    10-11-2013
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Select non-empty cell range with VBA

    Quote Originally Posted by HerryMarkowitz View Post
    Try following code..
    Please Login or Register  to view this content.
    Thank you, but i have found two issues:
    - i cannot copy the cells via Copy and Paste.
    - rows that do not have values on all columns are selected; the selection should look like in the attached picture: Attachment 282782

  4. #4
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Select non-empty cell range with VBA

    Sorry, but your explanation is very complicated for me...
    Make more clear explanation.
    Best regards.

  5. #5
    Forum Contributor
    Join Date
    03-28-2013
    Location
    *
    MS-Off Ver
    Excel 2010
    Posts
    226

    Re: Select non-empty cell range with VBA

    Please Login or Register  to view this content.
    this above code do what your looking for
    Last edited by venkatpvc; 12-09-2013 at 09:49 AM.
    Give Feedback and Click(*)

  6. #6
    Registered User
    Join Date
    10-11-2013
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Select non-empty cell range with VBA

    Quote Originally Posted by HerryMarkowitz View Post
    Sorry, but your explanation is very complicated for me...
    Make more clear explanation.
    Best regards.
    Quote Originally Posted by HerryMarkowitz View Post
    Sorry, but your explanation is very complicated for me...
    Make more clear explanation.
    Best regards.
    Hello,

    I have attached a picture. 3.png

    Thank you!

    Quote Originally Posted by venkatpvc View Post
    Please Login or Register  to view this content.
    This worked perfectly. Thank you !

  7. #7
    Forum Contributor
    Join Date
    03-28-2013
    Location
    *
    MS-Off Ver
    Excel 2010
    Posts
    226

    Re: Select non-empty cell range with VBA

    so did you get what you need ?

  8. #8
    Registered User
    Join Date
    10-11-2013
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Select non-empty cell range with VBA

    Quote Originally Posted by venkatpvc View Post
    so did you get what you need ?
    Yes the code works perfectly. Thank you very much.

  9. #9
    Forum Contributor
    Join Date
    03-28-2013
    Location
    *
    MS-Off Ver
    Excel 2010
    Posts
    226

    Re: Select non-empty cell range with VBA

    glad i could help please mark thread as SOLVED
    Please Add my REP.

    Thank you,

  10. #10
    Registered User
    Join Date
    10-11-2013
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Select non-empty cell range with VBA

    Yes, of course!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Select the last empty cell of the range specific
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2013, 09:48 AM
  2. Select Empty Cell Within a DropDown List Box's Range
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2010, 06:58 PM
  3. Replies: 1
    Last Post: 05-15-2006, 04:10 AM
  4. select first empty cell in a range
    By Shawn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2005, 08:05 PM

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