Construct a list that excludes 0 (from 0 0 0 1 2 3 to 1 2 3)

franlem2

New Member
Joined
Mar 4, 2009
Messages
24
Hi

I am trying to do a thing automatically. It's part of a more global automatization.

I have a range with the values 0 0 0 0 1 2 3 0 0 0 and I want, on the right, to get the list of 1 2 3 appearing.

Please look at the picture for an example of what I would need to do. Do you have any idea about how to do it ? A replace is not a solution for me as it's part of numerous steps to automatize a file. It must appear exactly as in the example. Thanks to those who will help me.
6820739666_2bce4a356c_b.jpg

Best regards.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
If 0, 0, 0, 0, 0, D009 is in B4:G4

Then select I4:N4,
type =IFERROR(INDEX($A4:$G4,SMALL(IF($B4:$G4<>0,COLUMN($B4:$G4)),COLUMN($A4:$G4))),"") into the formula bar
and enter it with Ctrl-Shift-Enter

Then drag down.
 
Upvote 0

Forum statistics

Threads
1,214,973
Messages
6,122,534
Members
449,088
Latest member
RandomExceller01

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