+ Reply to Thread
Results 1 to 5 of 5

Sorting Ascending within spceicified range

  1. #1
    Registered User
    Join Date
    01-22-2020
    Location
    HK
    MS-Off Ver
    Office365
    Posts
    7

    Exclamation Sorting Ascending within spceicified range

    Hi Experts

    It's me again. I've been trying different alternatives to sort the rows based on Col D per collection.

    This is the closest one, yet there are 2 bugs found.

    1- Loop and not able to exit when it reaches the last used rows.
    It keeps sorting until I press <Esc> to force quitting
    2- It's unable to sort where there is only one SKUs per collection
    It sort the next collection as well. Sometimes 3 collections sorted.
    e.g. Before Run - Row 9, 29, 32, 35, 45....

    Here is my code. What's wrong with my code?

    Please Login or Register  to view this content.
    Expected Result
    E.PNG

    Before the run
    B.PNG

    After then run
    A.PNG
    Attached Files Attached Files
    Last edited by kimfung20; 02-17-2020 at 10:00 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: Sorting Ascending within spceicified range

    You have a couple of threads started that you have not responded to.

    People take time to read and answer your questions.
    Read the answers to your threads and reply.
    If the thread is solved mark the thread as solved.

  3. #3
    Registered User
    Join Date
    01-22-2020
    Location
    HK
    MS-Off Ver
    Office365
    Posts
    7

    Re: Sorting Ascending within spceicified range

    Adding attachment to the threads. Hope it could be solved.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Sorting Ascending within spceicified range

    Hey kimfung20,

    Excel has these cool pivot table tools that can get you a great answer without needing VBA. See the attached where I removed your blank rows and did a pivot (very close) like you want.

    Time to learn Pivot Tables?

    Learn Pivot Table Field Settings.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    01-22-2020
    Location
    HK
    MS-Off Ver
    Office365
    Posts
    7

    Re: Sorting Ascending within spceicified range

    Hello Marvin,

    I wish I could use Pivot Table.
    Actually there are other informations in a row, like images.
    But I removed them to keep the minimal file size.
    To keep the spreadsheet format, I've tried multiple macro scripting.
    It's hard to use the pivot table to achieve that
    1) Grouped SKUs by collection
    2) Sort the SKUs and images per collection and keep collection subtotal at the bottom
    3) Blank a row and next collection

    Anyway, thanks for replying my thread.

+ 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. sorting ascending and descending order
    By beepetark in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-30-2019, 01:10 PM
  2. Sorting from ascending orders.
    By ideliveryx in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-01-2017, 03:16 AM
  3. [SOLVED] Ascending sorting within cell
    By Villalobos in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-03-2014, 11:02 AM
  4. [SOLVED] Sorting a range in ascending order in a spreadsheet containing headings multiple rows
    By vbabeginnerjae in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-03-2012, 07:16 AM
  5. x axis ascending order without sorting
    By vbidiot in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-30-2008, 09:31 AM
  6. ascending sorting
    By fofomama in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-14-2006, 10:45 AM
  7. Sorting Data in ascending order
    By sharon2006 in forum Excel General
    Replies: 1
    Last Post: 03-13-2006, 09:10 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