+ Reply to Thread
Results 1 to 4 of 4

Finding the column End and naming that

  1. #1
    Registered User
    Join Date
    12-01-2004
    Posts
    70

    Finding the column End and naming that

    Hello all,

    I have macro set up which will name the last columns, however the last columns are not the same in different work sheets, how do i find the last column and rename that?.

    Thanks

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Try this

    Please Login or Register  to view this content.
    It will give you the last used column number.

    rylo

  3. #3
    Registered User
    Join Date
    12-01-2004
    Posts
    70
    After finding the last column, could you please provide the code to name that column, I have to name 2 columns with Temp and Perm as headings. Thanks

  4. #4
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327
    Hi gaby58,

    Following on from rylo's code the following sub dinfs the last column and names the next column "Temp" and the next column "Perm". That is assuming that you want row 1 to have values input.

    Change the 1 in the line:

    Cells(1, findit +1).Value

    to whatever number corresponds to the row you want the heading to be in

    Please Login or Register  to view this content.
    Hope this helps

    Seamus

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1