Hlookup, how do i keep blanks from being entered?

CFSbookkeeper

New Member
Joined
Sep 16, 2011
Messages
3
My boss has a customer who doesn't want to keep track of ordering each individual piece. So my boss made up a package numbering system for this customer. This is a great idea but now I have to convert the customer's purchase order (with made up package numbers) into a purchase order for our vendor showing all of the individual products.

I started with different tabs. One shows the package name and products that make it (horizontally), one shows products with descriptions and pricing (vertically), and then another tab to do the data entry on. On the entry tab you enter a package name and it fills in 1 to 5 products that make up that package. However, I don't want it to return a "0" if there is less than 5 products.

Package________ Package 1_________ Package 2________ Package 3
Name

Product_________ Product A _________Product R _________Product L
List _____________Product B _________Product S _________Product Z
________________Product C _________Product Q
________________Product D
________________Product E


Here is my current formula:
=HLOOKUP(B$15,'Package Table'!B$2:AD$7,ROWS(C$15:C15)+1,0)

It works, as long as I list it five times for each Package Name input line (and change the row number for the next package entry line). But for the packages that have less than 5 product, it fills in "0" for each of those rows. That also means I have to "reserve" five rows for each package to be entered. (Not a very efficient way to do it.)

I then have a VLOOKUP to pull in the description and pricing. It works, but fills in "N/A" for each row that has a "0" filled in. (Which I understand why.)

My goal: Ultimately I would like to have a formula, that I could copy down all the rows, that would pick up only as many products as there are for that package and have the cursor ready on the next row to enter the next package.

Is this a pipe dream? Or maybe I am just going about it all wrong? Can anyone give me some help?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,947
Latest member
Gerry_F

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