Excell function
"Daly" skrev i en meddelelse
...
I have two columns :
size quantity
0 0
120 2
0 0
140 1
220 2
how can i convert these 2 columns in only one without 0 value and display
the value as shown below :
120
120
140
220
220
--
thank you & best regards
Daly
Here's one way, assuming your data in A2 :B11 (add your own ranges).
C1 must be empty (and present!)
In C2 enter this array formula:
=IF(ROW()-ROW($C$2)=SUM($B$2:$B$11),"-",INDEX($A$2:$A$11,MATCH(MIN(
IF(COUNTA($C$1:C1)<MMULT((ROW($B$2:$B$11)=TRANSPO SE(ROW($B$2:$B$11)))+0,
$B$2:$B$11),MMULT((ROW($B$2:$B$11)=TRANSPOSE(ROW( $B$2:$B$11)))+0,$B$2:$B$11))),
MMULT((ROW($B$2:$B$11)=TRANSPOSE(ROW($B$2:$B$11)) )+0,$B$2:$B$11),0)))
The formula must be committed with <Shift<Ctrl<Enter,
also if edited later.
If done correctly, Excel will display the formula in the formula bar
enclosed in braces { }. Don't enter these braces yourself.
They are Excel's way of showing, that the formula is an array formula.
Copy C2 down until the cell contains a hyphen.
--
Best regards
Leo Heuser
Followup to newsgroup only please.
|