SORTING PROBLEM . Please help
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: SORTING PROBLEM . Please help

  1. #1
    Join Date
    Jul 2014
    Posts
    2

    Post SORTING PROBLEM . Please help

    How to sort a single column without disrupting the rest of the Column ?

    Hopefully my question makes sense, I'm very tired and I've been fighting with sorting for awhile

    Please help me
    Code:
     range = sheet.Range("A1:D2000")
            range.Select()
            range.Sort(Key1:=range.Range("D1"), Order1:=Microsoft.Office.Interop.Excel.XlSortOrder.xlAscending, Orientation:=Microsoft.Office.Interop.Excel.XlSortOrientation.xlSortColumns)

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,006

    Re: SORTING PROBLEM . Please help

    Record a MACRO doing the same thing, then look at the generated code. Shouldn't be hard to spot the differences
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Nov 2014
    Posts
    6

    How to Sort in Excel

    How to Sort in Excel

    Sorting is used to reorder our data in excel. We can easily reorder the data based on the type of sorting that we choose. We have two methods to sort the data.

    Below are the steps to sort the given data in Excel:

    1 Select a single cell anywhere in the range that you want to sort.
    2 Select Data menu and select Sort from Sort & Filter group.
    3 In the Sort by list, select the first column on which you want to sort. (You can click on Add Level to include additional number of columns to sort).
    4 In the Sort On list, select the desired field from the drop down (Values, Cell Color, Font Color, or Cell Icon).
    5 In the Order list, select the order that you want to apply to the sort operation (A to Z or Z to A for text, lower to higher or higher to lower for numbers).
    6 Check the field My data has headers if your data has headers included.
    7 Click OK.

    Excel Consultants

Tags for this Thread

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a Codeguru.com survey!


HTML5 Development Center