formula to overwrite blank lines

purpleozzie

Board Regular
Joined
Jun 8, 2015
Messages
64
Hi,

I have the following formula..

Code:
=IFERROR(IF(ROWS($1:1)<=COUNTA('Pre-Packaged Beer'!A:A)*2,INDEX('Pre-Packaged Beer'!A:A,MOD(ROWS($1:1)-1,COUNTA('Pre-Packaged Beer'!A:A))+2),""), "")

Which cycles through a list of products twice...

Is there anyway of adding to this formula so that if the value in column 'Y' = 0 then to miss out that product.. However, I don't want blank lines..

for instance:

Column A Column Y
Product 1 £50.00
Product 2 £49.00
Product 3 £48.00
Product 1 0
Product 2 £85.00
Product 3 £83.00

Would equal:

Column A Column Y
Product 1 £50.00
Product 2 £49.00
Product 3 £48.00
Product 2 £85.00
Product 3 £83.00

I also don't want to use macro's

Cheers,
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,961
Messages
6,175,652
Members
452,664
Latest member
alpserbetli

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