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

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
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,215,461
Messages
6,124,954
Members
449,198
Latest member
MhammadishaqKhan

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