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
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

oldbrewer

Board Regular
Joined
Apr 11, 2010
Messages
11,005
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"
 

Watch MrExcel Video

Forum statistics

Threads
1,122,521
Messages
5,596,645
Members
414,083
Latest member
Mrsash

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
Top