Consolidate data from one sheet to another -How?

jsgeare

Board Regular
Joined
Dec 3, 2005
Messages
131
I have an order form of about 200 rows of product descriptions, prices and an empty cell for the customer to enter a quantity. I want to take the order form data and use it in an invoice which will list ONLY the products for which a qty was entered, all the rows together, no blank ones.

So far, the best I have come up with is to read each row with an IF statement that pulls the data from the order sheet to an invoice sheet IF qty > 0. But, where qty is not > 0, it leaves a blank line. And so, if the customer ordered the first item and the 200th, the invoice sheet will show the item on line 1, then 198 blank lines, then the 200th item. Otherwise, the products ordered are scattered up and down the invoice sheet.

I sort this list to push all the blank lines to the bottom, and there I have my invoice. But I suspect there is a more elegant way simply to bring the data across, without blank lines, from the get-go.

Any thoughts?

Thanks!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
You could use and AutoFilter to hide all other lines that do not contain values that way only the items that on the invoice are shown.
 
Upvote 0

Forum statistics

Threads
1,215,641
Messages
6,125,982
Members
449,276
Latest member
surendra75

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