Grab number from column but not the last number

kdrennan

New Member
Joined
Oct 16, 2018
Messages
9
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hello All,

I have a workbook with multiple worksheets. I populate the main page with information from the other worksheets.
This has worked fine until I tried to grab a number (not the last number) from column that has a total at the bottom.

I want to populate cell J3 on the main page with the last entered number of column AD on sheet 8. column AD has a total at the bottom that I do not want. I just want the last number in the column above the total. there are a number of empty cells in-between but all are empty.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
51,828
Office Version
  1. 365
Platform
  1. Windows
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

I have assumed data will not go below row 1000 in column AD. You can adjust that number up or down if you want.
See if this does what you want.

Excel Formula:
=LOOKUP(9.99E+307,AD1:INDEX(AD:AD,LOOKUP(9.99E+307,AD1:AD1000,ROW(AD1:AD1000))-1))
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
51,828
Office Version
  1. 365
Platform
  1. Windows
If you have Microsoft 365, you could also try
Excel Formula:
=INDEX(AD1:AD1000,LARGE(FILTER(ROW(AD1:AD1000),AD1:AD1000<>""),2))
 

kdrennan

New Member
Joined
Oct 16, 2018
Messages
9
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
If you have Microsoft 365, you could also try
Excel Formula:
=INDEX(AD1:AD1000,LARGE(FILTER(ROW(AD1:AD1000),AD1:AD1000<>""),2))
I do have 365, this is not pointing to the sheet8? is that why it gives me a NA error
 

kdrennan

New Member
Joined
Oct 16, 2018
Messages
9
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS

ADVERTISEMENT

I would like to use the code that works on both 2019 and 365 though.. Where can I insert sheet name at?
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
51,828
Office Version
  1. 365
Platform
  1. Windows
You're welcome. Glad you got it sorted. :)
 

Forum statistics

Threads
1,148,145
Messages
5,745,050
Members
423,917
Latest member
Frank1931

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