Value from row

Tariq123

New Member
Joined
Nov 5, 2022
Messages
13
Office Version
  1. 2013
If a row contain different value. Like. A1=0, B1=3, C1=0 D1=4. Then i need first value which is greater then 0. In another cell.
0 3 0 4
I need first value greater then 0, means 3 in A5 cell.
And 2nd value greater then zero in A6 which is 4.
How its possible through formula
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
When the values are in single digit then the result is coming correct. But when the values are in double digit i.e
A1 B1 C1 D1 E1
0 15 3 0 5
So the result is comming like this
A5 B5 C5 D5
1 5 3 5

But I need
A5 B5 C5 D5
15 3 5
 
Upvote 0
So the result is comming like this

1 5 3 5
That still sounds like you are not using the formula from post #8.

So the result is comming like this
A5 B5 C5 D5
You originally said that you wanted the results down a column, not across a row.
I need first value greater then 0, means 3 in A5 cell.
And 2nd value greater then zero in A6 which is 4.

Here is my method, either way. The number of digits in each number is irrelevant.

22 11 17.xlsm
ABCDE
11238015
2
3
4
5123815  
6
71
8238
915
10 
11 
>0
Cell Formulas
RangeFormula
A5:E5A5=IFERROR(INDEX($A1:$E1,AGGREGATE(15,6,COLUMN($A1:$E1)/($A1:$E1>0),COLUMNS($A5:A5))),"")
A7:A11A7=IFERROR(INDEX(A$1:E$1,AGGREGATE(15,6,COLUMN(A$1:E$1)/(A$1:E$1>0),ROWS(A$7:A7))),"")
 
Upvote 0
Here is my method, either way.
Actually, my formulas are not robust. If new columns are added at the left, the formulas will return incorrect results. Corrected formulas below.

22 11 17.xlsm
ABCDE
11238015
2
3
4
5123815  
6
71
8238
915
10 
11 
>0
Cell Formulas
RangeFormula
A5:E5A5=IFERROR(INDEX($A1:$E1,AGGREGATE(15,6,(COLUMN($A1:$E1)-COLUMN($A1)+1)/($A1:$E1>0),COLUMNS($A5:A5))),"")
A7:A11A7=IFERROR(INDEX(A$1:E$1,AGGREGATE(15,6,(COLUMN(A$1:E$1)-COLUMN(A$1)+1)/(A$1:E$1>0),ROWS(A$7:A7))),"")
 
Upvote 0
Solution
Hi,
Greeting

Thank you very much. Now my problem is resolved. I appriciate your this act of kindness. This plateform is really very helpfull for the people like me.
 
Upvote 0

Forum statistics

Threads
1,224,845
Messages
6,181,298
Members
453,030
Latest member
PG626

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