Invalid Qualifier Error Question

LambChoptheKid

New Member
Joined
Dec 10, 2022
Messages
35
Office Version
  1. 365
Platform
  1. Windows
Hey all,

I've had some success writing some simple VBA programs in the past, and right now I'm trying to make a VERY simple function that simply selects the last cell in Column A of my Worksheet "Test". Picture below.

Now I've written programs more complex than this before using these exact same variables of ws and lastRow to perform modifications to cells under the last used row, yet when I use them to try to simply select the final value in the row it doesn't seem to work and throws the Invalid Qualifier error.

What gives??

Any help would be appreciated. I'm sure the solution is simple but I work in an isolated environment and I cannot seem to wrap my head around why this isn't working.

I'd be happy to provide more details if necessary.
 

Attachments

  • example.png
    example.png
    16.4 KB · Views: 11

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
It needs to be
VBA Code:
Rows(LastRow).Select
Thank you! This comes very close to what I'm after.

This succeeds in selecting the last row with data, but I'm only wanting to select the last cell in column A with data. Any idea as to what modifications I could make to make that happen?

Thank you for the reply!
 
Upvote 0
How about
VBA Code:
Range("A" & LastRow).Select
 
Upvote 1
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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