+ Reply to Thread
Results 1 to 3 of 3

Sorting a sheet A-Z, based on specific column

  1. #1
    Registered User
    Join Date
    04-20-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    96

    Sorting a sheet A-Z, based on specific column

    Hi there,

    I'm trying to add a sorting A-Z feature to a current macro a member of this group helped me with. But haven't been able to do it on my own. I need to sort A-Z based on column C. Current code takes care of finding/deleting unwanted data, but I still need the sort part. Attached is a sample sheet. This is the code I currently have:


    Sub CLEAN_UP()
    Dim r As Range, x As Range, ff As String, e
    For Each e In Array("Decimals", "Photo", "ZZ", "Parts", "Hold")
    Set r = Cells.Find(e, , , 2)
    If Not r Is Nothing Then
    ff = r.Address
    If x Is Nothing Then Set x = r
    Do
    Set x = Union(x, r)
    Set r = Cells.FindNext(r)
    Loop Until ff = r.Address
    End If
    Next
    If Not x Is Nothing Then x.Delete xlShiftToLeft

    Cells.EntireColumn.AutoFit

    Range("A1").Select

    End Sub


    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Sorting a sheet A-Z, based on specific column

    See if this will work for you.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-20-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Sorting a sheet A-Z, based on specific column

    Hi Logit,

    Thank you so much for your help. I appreciate the time you took to help me with this. The code worked as desired.

    David

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Data Sorting to New sheet of specific column
    By csrahul in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2016, 01:39 PM
  2. [SOLVED] Macro to Cut and Paste row into specific sheet based on column value
    By danfullwood in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-12-2015, 09:04 AM
  3. [SOLVED] Trying to move specific range to a specific sheet based on data in certain column
    By cain2011 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-01-2013, 08:09 AM
  4. Replies: 0
    Last Post: 07-16-2013, 05:22 AM
  5. Sorting a range to invert it upside down without sorting by any specific column
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-29-2013, 12:53 PM
  6. [SOLVED] Sorting a range to invert it upside down without sorting by any specific column
    By luv2glyd in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-28-2013, 12:43 PM
  7. [SOLVED] copying specific certain column data based on cell/column value to another sheet
    By arctic7 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2012, 03:38 PM

Tags for this Thread

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