+ Reply to Thread
Results 1 to 3 of 3

last column equivalent to my last row statement

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    last column equivalent to my last row statement

    I found this last row statement below which works well. But i want to find a "last column" equivalent using this type of method..........does anyone know?

    last_row1 = fl_output_sht.Columns(1).Find("*", fl_output_sht.Cells(1, 1), xlValues, xlPart, xlByColumns, xlPrevious, False, False).Row
    where fl_output_sht is a user defined data type of "worksheet"
    Last edited by welchs101; 11-08-2011 at 08:15 AM.

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: last column equivalent to my last row statement

    Hi,

        
       last_col1 = fl_output_sht.Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByColumns).Column

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: last column equivalent to my last row statement

    thanks. i tried out your suggestion and it worked as well.

    I also found this online and it seems to work as well.

    last_col = fl_output_sht.Rows(1).Find("*", fl_output_sht.Cells(1, 1), xlValues, xlPart, xlColumns, xlPrevious, False, False).Column

+ 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