Related:
- Finding the last used Column
- Finding @ on keyboard - Guide
- How to convert row to column in notepad++ ✓ - Excel Forum
- Formula for finding position in excel - Office Software Forum
- How to increment numbers when value changes in another column? - Excel Forum
2 replies
vcoolio
Posts
1371
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
April 12, 2023
252
Oct 20, 2015 at 05:31 AM
Oct 20, 2015 at 05:31 AM
Hello Al,
See if this is what you are wanting:-
Cheerio,
vcoolio.
See if this is what you are wanting:-
Sub FindLastColumn() Dim lCol As Long lCol = Sheet1.Cells(1, Columns.Count).End(xlToLeft).Column Columns(lCol).Select MsgBox "The last column used is...." & lCol End Sub
Cheerio,
vcoolio.
Thanks for the reply, I should of said, I wanted to do it in WB not VBA
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
767
Oct 22, 2015 at 11:38 AM
Oct 22, 2015 at 11:38 AM
then use FIND
Al
>
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
Oct 23, 2015 at 07:05 AM
Oct 23, 2015 at 07:05 AM
Thank you for that. Could you please give a little more info. How do I use 'FIND'?
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
767
>
Al
Nov 2, 2015 at 02:50 PM
Nov 2, 2015 at 02:50 PM
I stand corrected. Find will not easily work for you. A VBA code is needed
Al
>
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
Nov 3, 2015 at 10:24 AM
Nov 3, 2015 at 10:24 AM
Thanks anyway.
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
767
Nov 3, 2015 at 12:01 PM
Nov 3, 2015 at 12:01 PM
You can use CONTROL + END. It should stop at the intersection of max row used and max column used.