Find last cell an another sheet without activating that sheet

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,362
Office Version
  1. 2010
Using Excel 2010

Hello,

I am using below code to find last empty cell in the column “C” having in the active sheet1.
VBA Code:
Sub Find_Last_Cell ()
Range("C" & Cells.Rows.Count).End(xlUp).Offset(1, 0).Select
End Sub
Now assume I have active Sheet1…and want to find last empty cell in the column “C” in the sheet2…without activating "Sheet2" how I can do it.

Please suggest a code

Regards,
Moti
 
So, do you need more help?

Are you saying you want a button on a master sheet that when pressed will take you to the last cell with data in column C?

If not I'm not sure what you want.

Your subject title says:
Find last cell on another sheet without activating that sheet
And do what??
Do you want to enter some data there or what?
Hello My Aswer Is This, thank you for your kindness, yes I need but it is solved as I wanted by @bebo021999.

Have a nice weekend and good luck.

Regards,
Moti :)
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I guess that before running the code, the cursor is randomly positioned on each sheet, possibly anywhere.
You want that when you navigate to a sheet, the cursor is always set to the last row of column C (to facilitate data entry?).
If so, the following code will set the cursor to the desired position:
VBA Code:
Option Explicit
Sub Find_Last_Cell()
Dim ws As Worksheet
Application.ScreenUpdating = False
For Each ws In Sheets ' loop every sheets
    ws.Activate ' then activate it
    ws.Cells(Rows.Count, "C").End(xlUp).Offset(1, 0).Select ' select last cell
Next
Application.ScreenUpdating = True
Sheets("Sheet1").Activate ' back to first sheet
End Sub
Hello @bebo021999, thank you for understanding my request and giving a spot on solution VBA worked like magic this is what I was after it. 🤝

Have a nice weekend and good luck.

Regards,
Moti :)
 
Upvote 0

Forum statistics

Threads
1,215,137
Messages
6,123,252
Members
449,093
Latest member
Vincent Khandagale

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