Move to the last cell in a specific column

sofas

Active Member
Joined
Sep 11, 2022
Messages
476
Office Version
  1. 2019
Platform
  1. Windows
Hi I have a column with formulas that fetch data from another sheet . What is required is to move to the last cell with a fetched value I tried to put this code but it specifies all cells for me I want to move to the last cell only

VBA Code:
Sub Select_logic()
Dim myRng As Range
Set myRng = Range("C4", Range("c" & Rows.Count).End(4)).SpecialCells(xlCellTypeFormulas, 2)
myRng.Select
End Sub
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I found this code but it only works when I find text, how can I modify it to work with both numbers and texts?

VBA Code:
Sub Select_logic()
Dim myRng As Range
Set myRng = ActiveSheet.Range("C4", Range("c" & Rows.Count).End(4)).SpecialCells(xlCellTypeFormulas, 2)
With myRng
myRng.Cells(myRng.Rows.Count, 1).Select
End With
 
Upvote 0
Try
VBA Code:
Sub select_Last()
  Columns("C").Find(What:="*", LookIn:=xlValues, SearchDirection:=xlPrevious).Select
End Sub
 
Upvote 1
Solution

Forum statistics

Threads
1,215,263
Messages
6,123,957
Members
449,135
Latest member
jcschafer209

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