+ Reply to Thread
Results 1 to 9 of 9

How to have VBA search a column for nonblank cells

  1. #1
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    How to have VBA search a column for nonblank cells

    I have a worksheet that uses advanced filters with the below code. I need to put text in cell AF2 on my RawData sheet that will allow the code to return rows that contains
    text. The issue I am running into is I do not know what to put into the cell to tell the code to return all rows that contain data. Anyone able to help?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How to have VBA search a column for nonblank cells

    Hello Teblol ,

    A quick glance at your Code seems to be somewhat conflicting, hence some possible issues.

    Since your workbook may contain some other Code and/or conditions, which may affect your snippet of Code, why not attach a sample workbook.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: How to have VBA search a column for nonblank cells

    If I understand your objective, you could try
    Please Login or Register  to view this content.
    as an alternative method. But would need to change how you copy the results to B10.

  4. #4
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: How to have VBA search a column for nonblank cells

    I was hoping someone would be able to get it without me posting a workbook but it doesn't look like that is going to happen.

    On the sheet named "Master" I have the first 6 columns with 6 different lists. These lists are used as drop down selections on the sheet named
    "Filter". When one of the choices are selected in each drop down, the results of the formulas in column D on sheet "Filter" change. These results
    are placed into row 2 of column AA through AF on sheet "RawData". I click the button named "Run" on sheet "Filter" and the below macro runs. The results are placed in cell AB10 on sheet "Filter". See the first attachment for an example of the results. I need to figure out what to make the result of the formula in cell D8 on sheet "Filter" in order to allow the code to only return the rows that have text in column L on sheet "RawData". The result will be the product of an IF formula when the option "Yes" is chosen from cell C8. The results I would like are shown in the second attachment. I hope this is enough info for you. If not, please let me know and I will be happy to provide more.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Teblol; 02-03-2016 at 05:32 PM.

  5. #5
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: How to have VBA search a column for nonblank cells

    Anyone? I am still stumped after more hours of trying to solve.

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How to have VBA search a column for nonblank cells

    Hi Teblol,

    Which one of the two sample Workbooks would you like us to respond to?

  7. #7
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: How to have VBA search a column for nonblank cells

    The only difference between the two is that the second workbook has what I would like the results to look like if run properly. So either one is fine.

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How to have VBA search a column for nonblank cells

    Hello Teblol,

    Thank you for the clarification. I am a bit tied up now with several other requests, but I promise to return to you issue as soon as I can!

    Regards.

  9. #9
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: How to have VBA search a column for nonblank cells

    OK much appreciated!

+ 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. Highlight the 1st NonBlank Cell upto the last NonBlank
    By Jarvin24 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-19-2015, 12:11 AM
  2. Replies: 4
    Last Post: 04-25-2013, 03:53 AM
  3. Replies: 2
    Last Post: 12-22-2011, 07:05 PM
  4. Replies: 10
    Last Post: 07-21-2011, 07:23 AM
  5. formula to count nonblank cells in a column
    By 2funny4words in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-13-2010, 06:31 PM
  6. [SOLVED] Find last nonblank in a column
    By RagDyeR in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 09-06-2005, 03:05 PM
  7. Find last nonblank in a column
    By George W. Barrowcliff in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

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