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

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
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,215,387
Messages
6,124,633
Members
449,177
Latest member
Sousanna Aristiadou

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