How to get LAST value of the column

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,214
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
My values are NUMERICALS (-ve, 0 or +ve) in C2:C9999
In B2, I want LAST value of the column C2:C9999 & it must be +ve.
How to accomplish?
Thanx in adv
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
So you mean the last value above 0 ?

Try
=LOOKUP(2,1/(C2:C9999>0),C2:C9999)
 
Upvote 0
My values are NUMERICALS (-ve, 0 or +ve) in C2:C9999
In B2, I want LAST value of the column C2:C9999 & it must be +ve.
How to accomplish?
Thanx in adv

Try...

=LOOKUP(9.99999999999999E+307,1/(ISNUMBER(C2:C9999)*(C2:C9999>=0)),C2:C9999)
 
Upvote 0
=LOOKUP(9.99999999999999E+307,1/(ISNUMBER(C2:C9999)*(C2:C9999>=0)),C2:C9999)[/QUOTE]
It returns 0. I don't want 0 to be returned (& neither -ve).
 
Upvote 0
=LOOKUP(9.99999999999999E+307,1/(ISNUMBER(C2:C9999)*(C2:C9999>=0)),C2:C9999)
It returns 0. I don't want 0 to be returned (& neither -ve).[/QUOTE]

Change the >= test to just the > test...

=LOOKUP(9.99999999999999E+307,1/(ISNUMBER(C2:C9999)*(C2:C9999>0)),C2:C9999)
 
Upvote 0
=LOOKUP(9.99999999999999E+307,1/(ISNUMBER(C2:C9999)*(C2:C9999>0)),C2:C9999)[/QUOTE]
It looks for values in C2:C9999 but STOPS once it find a 0 & returns the last found value. C2=100, C3=200 & C4=0, C5=786. It reurns 200 (WRONG) 786 (CORRECT)
 
Upvote 0
=LOOKUP(9.99999999999999E+307,1/(ISNUMBER(C2:C9999)*(C2:C9999>0)),C2:C9999)
It looks for values in C2:C9999 but STOPS once it find a 0 & returns the last found value. C2=100, C3=200 & C4=0, C5=786. It reurns 200 (WRONG) 786 (CORRECT)[/QUOTE]

Row\Col
C​
D​
E​
1​
2​
9​
3​
4​
-4​
5​
-3​
6​
6​
7​
0​
8​
9​
9​
10​
11​
-2​
12​

E2:

=LOOKUP(9.99999999999999E+307,1/(ISNUMBER(C2:C9999)*(C2:C9999>0)),C2:C9999)
 
Upvote 0
It looks for values in C2:C9999 but STOPS once it find a 0 & returns the last found value. C2=100, C3=200 & C4=0, C5=786. It reurns 200 (WRONG) 786 (CORRECT)
E2:

=LOOKUP(9.99999999999999E+307,1/(ISNUMBER(C2:C9999)*(C2:C9999>0)),C2:C9999)[/QUOTE]

IT WORKS. I'll check again & inform you tomorrow as well.
 
Upvote 0
Either formula suggested works just fine for me.

Aladin's is more error proof as it accounts for text entries in the range.
I left that out of mine because you said your range was numeric..

E2: =LOOKUP(9.99999999999999E+307,1/(ISNUMBER(C2:C9999)*(C2:C9999>0)),C2:C9999)
F2: =LOOKUP(2,1/(C2:C9999>0),C2:C9999)


Excel 2010
CDEF
2100786786
3200
40
5786
Sheet1
 
Upvote 0
=LOOKUP(9.99999999999999E+307,1/(ISNUMBER(C2:C9999)*(C2:C9999>0)),C2:C9999)[/QUOTE]

IT WORKS. I'll check again & inform you tomorrow as well.[/QUOTE]

IT WORKS. Thanks
 
Upvote 0

Forum statistics

Threads
1,215,497
Messages
6,125,155
Members
449,208
Latest member
emmac

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