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

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,224,884
Messages
6,181,571
Members
453,054
Latest member
arz007

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