Select cell next to last column VBA

doriannjeshi

Active Member
Joined
Apr 5, 2015
Messages
338
Office Version
  1. 365
Platform
  1. Windows
Hi ,
Just as the title
I need to select the next cell of the first row next to the last column, with vba
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
oh well,
Nor that is allowing me to select the cell I want
my data ends in column Ak1 and I need to select Al1 (where I will place a formula)
 
Upvote 0
my data ends in column Ak1
Are the cells after it truly blank or formulas returning ""

If they are truly blank and on row 1 one way is just

VBA Code:
Cells(1, Columns.count).End(xlToLeft).Offset(, 1).Select

If it is formulas returning "" then it is

VBA Code:
Rows(1).Find("*", , xlValues, , xlByColumns, xlPrevious).Offset(, 1).Select
 
Last edited:
Upvote 0
Are the cells after it truly blank or formulas returning ""

If they are truly blank and on row 1 one way is just

VBA Code:
Cells(1, Columns.count).End(xlToLeft).Offset(, 1).Select

If it is formulas returning "" then it is

VBA Code:
Rows(1).Find("*", , xlValues, , xlByColumns, xlPrevious).Offset(, 1).Select
Yes, this is it
Thank you Mark
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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