Not sure if this is the best way, but it does work.
=SUMPRODUCT(LARGE(ROW(A1:AX)*(A1:AX<>""),2))
Change the column letter as needed and change the two X's to a row number guaranteed to be larger than the largest row you ever expect to have data in.
Change the column letter as needed and change the two X's to a row number guaranteed to be larger than the largest row you ever expect to have data in.
I received the following private message from Marcelo Branco (not sure why he didn't post this directly) which caught an omission with the formula posted. Here is the main part of his message...
Marcelo was absolutely correct... I concentrated on getting the row number correct that I forgot to plug it into an INDEX function call in order to get the requested contents of the cell. Note that there are now three X's to change.
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.