Results 1 to 3 of 3

Thread: How to avoid the lookup of Empty Cells

  1. #1

    How to avoid the lookup of Empty Cells



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello,

    I have the attached spreadsheet in which I have to create a macro that will be looking up all the cells except the empty ones. Basicaly, I do not want the vlookup function to lookup the empty cells which will provide as a result N/A. In other words, I want to only lookup the cells where we have something written. I don't want any blank Cells in my new table. Can someone help me with this?

    Thanks in advance,

    Michael
    Attached Files Attached Files

  2. #2
    I forgot to mention that purpose of the exercise is to create a Tableau like the one in sheet13 by using a Macro. We import the information from a database. The result is the one seen on the Tab called DataImport. The goal is, using a Macro, create a Table like the one in the Tab called Sheet13. Thanks

  3. #3
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,512
    Articles
    0
    Excel Version
    365
    It looks as though the intention is to create a table which corrects for the multiple lines in the comments column. So rather than accede to your wish for a macro to place formulae in cells, I wrote a macro to concatenate the comments into single cells. The result is a table exactly the same as filtering DataImport Original on the column headed Final for cells containing "last". (edit after posting: I've just discovered hidden Sheet13!!)
    There are comments in the code.
    If you were to delete the lines of code which make a copy of the sheet, and allowed the code to operate directly on the sheet DataImport, it looks like the query is NOT deleted and you should still be able to refresh it.
    The code is in Module1 of the attached, and I've deleted the Sheet Macro as it's probably redundant.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •