How to avoid the lookup of Empty Cells

Mchael

New Member
Joined
Dec 29, 2014
Messages
21
Hello,

I have a 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
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
in B1 you want to look up A1 in mytable

=if(A1="","",vlookup(A1, mytable,2)

not sure what you mean by "don't want any blank cells in my new table"
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top