VLOOKUP Skip Blank Cells

CAhawkeye10

New Member
Joined
Mar 28, 2014
Messages
2
I have a set of data similar to the below table.

ABCD
1SubjectLengthWidthHeight
2Type 11058
3Type 3
4Type 4
5Type 2
6Type 1632
7Type 2
8Type 1588
9Type 1567

<tbody>
</tbody>

There are multiple types of subjects in question but only some have a length, width and height. I would like to combine all of those which do, Type 1 in this case, into a separate worksheet so that there are no blanks inbetween. The new table would look similar to the one below.

A
B
C
D
1
SubjectLengthWidthHeight
2
Type 11058
3
Type 1632
4
Type 1588
5
Type 1567

<tbody>
</tbody>

I'm assuming that I would use VLOOKUP somehow but I'm not sure what exactly the formula should contain. I'm also aware that this could be easily done using filters on the first worksheet but multiple people will be using this and I want there to be as little room for error in the future. Any help will be greatly appreciated.

Thanks!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Try this approach using a helper column (I used E), copy this into sheet1 E2, and copy down...
=IF(COUNTA(B2:D2)=0,E1,E1+1)

Then in sheet2 (where you want the answer to be, use this copied dowqn and across...
=IFERROR(INDEX(Sheet1!$A$1:$D$9,MATCH(ROW(A1),Sheet1!$E$1:$E$9,0),MATCH(A$1,Sheet1!$A$1:$D$1,0)),"")
 
Upvote 0

Forum statistics

Threads
1,215,461
Messages
6,124,955
Members
449,199
Latest member
Riley Johnson

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