Last used Row and Column Number in a Sheet

Mrinal

New Member
Joined
Sep 13, 2011
Messages
21
Hi,
I want a formula to get the maximum Row and column number used in any sheet. Please note that data is scattered in the sheet. Any formula which will give me the Row number and column number will solve my problem.

Thanks.
Mrinal
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I want a formula alternate to END+HOME. This gives me the last row/column used in a work sheet.
 
Upvote 0
what you can do is build a button and assign the following VBA code to that button

Sub last()

i = ActiveCell.SpecialCells(xlLastCell).Row
j = ActiveCell.SpecialCells(xlLastCell).Column

MsgBox (i & "," & j)

End Sub


on clicking the button will give you the last row and last column in a messagebox
 
Upvote 0
I am afraid that there is no formula that can do this...you can make your custom function and use it but that is as good as the VBA code that I have provided above...
 
Upvote 0
Are you not allowed to use vba, or just uncomfortable w/it?
 
Upvote 0
I am afraid that there is no formula that can do this...you can make your custom function and use it but that is as good as the VBA code that I have provided above...

As VBA Coded Excel file extension is not same as xlsx, Now a days I am not attaching VBA code with my Excel file like previous version. I have made a Addin with your VBA code so that it will be common to every sheet but I am unable to activate that function last(). Can you please guide me in this matter so that I can use in the menu bar.
 
Upvote 0
Are you not allowed to use vba, or just uncomfortable w/it?

I am very much fond of VBA code, I used to write till the previous version of xls file, now a days you can not make xlsx file with vba code attached what I understand, that is why I am avoiding using vba code for portability purpose.

Anyway, if you also can guide me how to use any addin in the menu bar it is welcome.
 
Upvote 0
I am very much fond of VBA code, I used to write till the previous version of xls file, now a days you can not make xlsx file with vba code attached what I understand, that is why I am avoiding using vba code for portability purpose.

Anyway, if you also can guide me how to use any addin in the menu bar it is welcome.

Only two points or questions at this time, as I really should be sleeping. (I am sure that you will get great help here before I get to check back, but I will, just in case.)

You obviously are using the 'last cell' for a purpose. What is it?

If the users are hesitant to enable a xlsm macro, why do we think the will allow addins to load? Plus there is distribution...
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,472
Members
452,915
Latest member
hannnahheileen

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