Returning the last row that has data in a specific column

Blanchetdb

Board Regular
Joined
Jul 31, 2018
Messages
153
Office Version
  1. 2016
Platform
  1. Windows
I need a formula that will return the last row that has data within column E

example:
Column E Column F Column G Column H
ScienceBobASNCR
FredEGQuebec
HRJaneCROntario
SusyPMOntario
OperationsJohnEGWest

I need the formula to return a count of 5

the formula is located on Sheet "Engine" A2 but the data in on Sheet "Staffing-Processes" E2:E

thank you
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I need a formula that will return the last row that has data within column E

example:
Column E Column F Column G Column H
ScienceBobASNCR
FredEGQuebec
HRJaneCROntario
SusyPMOntario
OperationsJohnEGWest

I need the formula to return a count of 5

the formula is located on Sheet "Engine" A2 but the data in on Sheet "Staffing-Processes" E2:E

thank you
Just found it

=SUMPRODUCT(MAX(('Staffing-Processes'!A2:E5000<>"")*ROW('Staffing-Processes'!E2:E5000)))
 
Upvote 0
Solution
OK ... a bit of clarificatiion is needed. It looks like your sample sheet has data in column E (i.e. Science, HR, and Operations).
It is easy to find the last row. But, what is this function supposed to return? the Last Row of data? the Last 5 rows of data? just the number 5 (and why 5?)
Please clarify.
 
Upvote 0
Just found it

=SUMPRODUCT(MAX(('Staffing-Processes'!A2:E5000<>"")*ROW('Staffing-Processes'!E2:E5000)))
Whilst that will certainly work, SUMPRODUCT is a fairly inefficient function. Another option would be
Excel Formula:
=AGGREGATE(14,6,ROW('Staffing-Processes'!E1:E5000)/('Staffing-Processes'!E1:E5000<>""),1)

.. or if the entries in col E will always be text values you could also try
Excel Formula:
=LOOKUP("zzz",'Staffing-Processes'!E2:E5000,ROW('Staffing-Processes'!E2:E5000))
 
Upvote 0

Forum statistics

Threads
1,215,453
Messages
6,124,930
Members
449,195
Latest member
Stevenciu

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