+ Reply to Thread
Results 1 to 3 of 3

Sort across a single row

Hybrid View

  1. #1
    Scott P
    Guest

    Sort across a single row

    Hi,

    Is it possible to use the Sort method in Excel VBA to sort values contained
    in a single row? If so, how? I tried this by declaring a range (which
    represents cells in a single row) and the applying the sort method to this
    range and this does not work.

    I know this works for sorting columns, but I want to sort left to right
    across a row. Any assistance is appreciated.

  2. #2
    Tom Ogilvy
    Guest

    RE: Sort across a single row

    select the row and do Data=>Sort, in the sort dialog, click the options
    button and choose left to right.

    If you need a macro, turn on the macro recorder while you do it manually.

    --
    Regards,
    Tom Ogilvy


    "Scott P" wrote:

    > Hi,
    >
    > Is it possible to use the Sort method in Excel VBA to sort values contained
    > in a single row? If so, how? I tried this by declaring a range (which
    > represents cells in a single row) and the applying the sort method to this
    > range and this does not work.
    >
    > I know this works for sorting columns, but I want to sort left to right
    > across a row. Any assistance is appreciated.


  3. #3
    Scott P
    Guest

    RE: Sort across a single row

    Thank you very much, Tom. This is a big help.

    "Tom Ogilvy" wrote:

    > select the row and do Data=>Sort, in the sort dialog, click the options
    > button and choose left to right.
    >
    > If you need a macro, turn on the macro recorder while you do it manually.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Scott P" wrote:
    >
    > > Hi,
    > >
    > > Is it possible to use the Sort method in Excel VBA to sort values contained
    > > in a single row? If so, how? I tried this by declaring a range (which
    > > represents cells in a single row) and the applying the sort method to this
    > > range and this does not work.
    > >
    > > I know this works for sorting columns, but I want to sort left to right
    > > across a row. Any assistance is appreciated.


+ 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