ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   if the value of a cell in a range is not blank, then return the v. (https://www.excelbanter.com/excel-worksheet-functions/21238-if-value-cell-range-not-blank-then-return-v.html)

kvail

if the value of a cell in a range is not blank, then return the v.
 
I need to return the value of a cell in a range that is not blank..

A B C D E
1 5 (return 5 in e1)
2 3 (return 3 in e2)
3 4 (return 4 in e3)
4 (return " " in e4)

Peo Sjoblom

Put this in E1

=IF(COUNT(A1:D1),INDEX(A1:D1,MATCH(1,--(ISNUMBER(A1:D1)),0)),"")

enter it witrh ctrl + shift & enter
copy it down

why would you want to putr a space in the cell as
opposed to a blank ""?


Regards,

Peo Sjoblom



"kvail" wrote:

I need to return the value of a cell in a range that is not blank..

A B C D E
1 5 (return 5 in e1)
2 3 (return 3 in e2)
3 4 (return 4 in e3)
4 (return " " in e4)


Dave Peterson

Is it always numeric input?

If yes, I'd just use:

=if(count(a1:d1)=0,"",max(a1:d1))

(and copy down)

kvail wrote:

I need to return the value of a cell in a range that is not blank..

A B C D E
1 5 (return 5 in e1)
2 3 (return 3 in e2)
3 4 (return 4 in e3)
4 (return " " in e4)


--

Dave Peterson


All times are GMT +1. The time now is 04:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com