Find the last column

Fire_Chief

Well-known Member
Joined
Jun 21, 2003
Messages
693
Office Version
  1. 365
Platform
  1. Windows
I thought I was understanding this but I obviously don't and need more help.
I am trying to find the last column in a row that has data.

CT28OB2,000168$ 105.83379128$ 0.98Liner 10 T2580YES *

With the active cell being "A"
This is what I tried last ..... Range(ActiveCell.Address).End(xlToRight).Select
It returns Column K and what I want is N. It doesn't see the asterisk
L and M are empty
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
You do it in the same way as I showed you here ;)
 
Upvote 0
That is because there are blanks in the middle of your data. If you go from the right, it stops at your first blank. It is better to start in the last column, and go left, i.e.
Cells(ActiveCell.Row,Columns.Count).End(xlToLeft).Select

Edit: Too slow! This is exactly the same as what Fluff showed you the other day.
 
Upvote 0
I thought I tried that but I guess I didn't.
Maybe I should stop for a while.... lol

Thanks
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,494
Messages
6,125,139
Members
449,207
Latest member
VictorSiwiide

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