vlookup many - add row

rowbro

Board Regular
Joined
Dec 16, 2010
Messages
50
Hi guys.

I have a strange excel document that I need a bit of help with:

The first sheet has a user input for just one thing - a "Project Code". When this has been entered by the user, I want the sheet to auto display an "expenditure item" and "value", looked up from the second sheet in the document. This is easy enough using vlookup, BUT for each project there may be up to 16 expenditure items. The second part of this problem is that while there MAY be up to 16, most projects have about 4. So what I am trying to do is to display all of the expenditure items from the second sheet (per project) if they contain a value greater than 0, but in such a way that only the number of rows that are required for the number of expenditure items with values greater than zero are used up (i.e. I don't want a whole lot of blank cells/rows due to the POSSIBLE (but unlikely) 16 expenditure items).

Anyone got any bright ideas?

Many thanks
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
With alittle VB you could:

Filter the data using the project code entered and Value > 0

You could then copy that info to sheet 1 as a picture.
 
Upvote 0
Thanks for the reply. Is that really the only/best way of achieving this? I was hoping that there would be some clever solution using arrays and VBA.
 
Upvote 0
Oh No. Definately not the only way, just a suggestion.

Array is possible but I would be of no help in that respect :)
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,845
Members
452,948
Latest member
UsmanAli786

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