Last numeric value in row

APML

New Member
Joined
Sep 10, 2021
Messages
31
Office Version
  1. 365
Hi All, just wondering if someone can help me with finding the last numeric value in a row greater than zero. So far I have the following but I'm finding it will return a string if it happens to be the last value in the row.. but I'm only wanting the number greater than zero. WatchT1 is the name of the row (range) containing the values and strings

=INDEX(WatchCloseT1,,MATCH(0,WatchCloseT1,0)-1)
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Phuoc

Well-known Member
Joined
Apr 29, 2016
Messages
537
Office Version
  1. 2016
Try this

Book1
ABCDEFGH
1
220-27-57
Sheet1
Cell Formulas
RangeFormula
H2H2=-LOOKUP(0,-A2:G2/(A2:F2>0))
 
Solution

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
37,659
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Give this formula a try...

=LOOKUP(2,1/((WatchT1>0)*ISNUMBER(WatchT1)),WatchT1)
 

Phuoc

Well-known Member
Joined
Apr 29, 2016
Messages
537
Office Version
  1. 2016
Sorry, change to:

=-LOOKUP(0,-A2:G2/(A2:G2>0))
 

APML

New Member
Joined
Sep 10, 2021
Messages
31
Office Version
  1. 365
Great works really well, i appreciate the help
 

Toadstool

Well-known Member
Joined
Mar 5, 2018
Messages
2,472
Office Version
  1. 2016
Platform
  1. Windows
Hi APML,

I'm not sure if you're searching vertically or horizontally so here's both:

APMH.xlsx
ABCDEFGHIJKLM
1DataVerticalHorizontalDataDog2288Cat
212288
3Dog
4
522
6
7Cat
8
9
Sheet1
Cell Formulas
RangeFormula
C2C2=INDEX(WatchCloseT1,AGGREGATE(14,6,ROW(WatchCloseT1)-ROW($A$1)/(ISNUMBER(WatchCloseT1)),1))
E2E2=INDEX(WatchCloseT2,,AGGREGATE(14,6,COLUMN(WatchCloseT2)-COLUMN($E$1)/(ISNUMBER(WatchCloseT2)),1))
Named Ranges
NameRefers ToCells
WatchCloseT1=Sheet1!$A$2:$A$11C2
WatchCloseT2=Sheet1!$F$1:$P$1E2
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,571
Messages
5,770,920
Members
425,652
Latest member
Pemby

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
Top