SOLVED

Excel 365 - Extracting non-empty values from a row of values?

Copper Contributor

Hi,

 

I've been searching and trying out different formulas that I found online and I couldn't get it to work, so I'm a bit perplexed and am asking for some help. It would be amazing if someone smarter than me can show me the way of making this work using formulas, because I have quite a bit of data to go through.

 

I have tried this formula that I found on reddit after some modification:

 

1) =IF(COLUMNS($A1:A1)>COUNTA($A1:$Z1),"",INDEX($A1:$Z1,SMALL(IF($A1:$Z1<>"",COLUMN($A1:$Z1)),COLUMNS($A1:A1)))) where the A1:Z1 was replaced with AA:AI but it didn't work.

 

2) =IFERROR(INDEX($A2:$G2,AGGREGATE(15,6,COLUMN($A:$G)/NOT(ISBLANK($A2:$G2)),COLUMNS($A:A))),"") where A2:G2 was replaced with AA:AI but that also did not work.

 

I don't really understand both the complex formula above.

 

What I need to have is this, it would be amazing if someone can show me the way: 

 

 AA       AI AK        AT
WHAT I HAVET+0T+1T+2T+3T+4T+5T+6T+7T+8 WHAT I WANTT+0T+1T+2T+3T+4T+5T+6T+7T+8
X1   177.002177.082175.222175.169   X1177.002177.082175.222175.169     
X2     1.6321.6321.6321.632 X21.6321.6321.6321.632     
4 Replies

@AC626 

Formula in AL2:

=IFERROR(INDEX(2:2,AGGREGATE(15,6,COLUMN($AA2:$AI2)/($AA2:$AI2>0),COLUMNS($AL2:AL2))),"")

Copy to the right and down.

Hi, thanks for your quick response but it still gives me the blanks, which I don't want. I want the order of the extracted value to always be T+0, T+1..,T+3. Any idea how?
best response confirmed by AC626 (Copper Contributor)
Solution

@AC626 

The cells are not really empty, aren't they? The probably contain a formula.

Change ($AA2:$AI2>0) to ($AA2:$AI2<>"").

 

Yes!!! It worked! Thanks a lot!
1 best response

Accepted Solutions
best response confirmed by AC626 (Copper Contributor)
Solution

@AC626 

The cells are not really empty, aren't they? The probably contain a formula.

Change ($AA2:$AI2>0) to ($AA2:$AI2<>"").

 

View solution in original post