+ Reply to Thread
Results 1 to 2 of 2

Rightmost Column

  1. #1
    BillCPA
    Guest

    Rightmost Column

    Is there an equivalent to

    'LastRow = Cells(Rows.Count, "A").End(xlUp).Row'

    for finding the last column to the right that contains data?

    --
    Bill @ UAMS

  2. #2
    Chip Pearson
    Guest

    Re: Rightmost Column

    Use the xlToLeft constant with End. E.g.,

    Dim LastCol As Integer
    LastCol = Cells(1, Columns.Count).End(xlToLeft).Column
    Debug.Print LastCol


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    "BillCPA" <Bill @ UAMS> wrote in message
    news:46A74C56-FE28-46F9-93C7-607D2B261D24@microsoft.com...
    > Is there an equivalent to
    >
    > 'LastRow = Cells(Rows.Count, "A").End(xlUp).Row'
    >
    > for finding the last column to the right that contains data?
    >
    > --
    > Bill @ UAMS




+ 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