How to avoid the lookup of Empty Cells

Michael1974

New member
Joined
Mar 31, 2015
Messages
49
Reaction score
0
Points
0
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
 

Attachments

  • TOILET REPLACEMENT HISTORY MacroTrial.xls
    295 KB · Views: 11
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
 
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.
 

Attachments

  • ExcelGuru4598TOILET REPLACEMENT HISTORY MacroTrial.xls
    233.5 KB · Views: 4
Back
Top