+ Reply to Thread
Results 1 to 6 of 6

Data Sorting to a Specific Format

  1. #1
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    136

    Data Sorting to a Specific Format

    The code below sorts data for me but I will need a modification so as to achieve my new goal.
    From the attached spreadsheet, the first tab called “data” is the data that I want to sort in a particular format. The second tab called “Results” is what I sorted already with the old code, while the third tab “Preferred” is the actual thing that I need.
    This is what I need:
    Whenever the macro meets a cell that has no value in it, it should replace the blank cell with “1*” also whenever the macro meets a cell that has the same date (as you can see that the orange cells have the same date as the gray rows), instead of outputting the result as shown in “Results” tab, I want the macro to combine these rows as shown in the “preferred” tab.
    Also you can see that the yellow cell has the same date as “1-Feb-07” I will like to combine it as shown in the preferred tab.
    Thanks a lot for your help.
    Below is my code:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by vnzerem; 12-05-2014 at 05:10 PM.

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

    Re: Data Sorting to a Specific Format

    you could use a filter macro instead, click the button and then check out results sheet.

    edit the code to suite your requirements.

    Checkout the attached.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Data Sorting to a Specific Format

    davesexcel...thank you so much for your solution, but the code does not give me exactly the format specified in the "preferred" tab of the spreadsheet. The preferred tab is what I am looking for.

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

    Re: Data Sorting to a Specific Format

    Please read the second line of my previous post.

    My code shows you how to get the data to the next sheet, edit the code to format it the way you require.

  5. #5
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Data Sorting to a Specific Format

    thanks a lot davesexcel....I missed the second line and jumped straight to the code. I truly appreciate this. It is really thinking outside the box. I will proceed and modify your code to suite my needs. Thanks once more for your time and have a wonderful day ahead.

  6. #6
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Data Sorting to a Specific Format

    davesexcel:
    Thanks so much for giving me the foundation to write the code. Below is the code I was able to achieve by modifying your code and it worked out great. I appreciate the help!
    Please Login or Register  to view this content.

+ 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. Need help with specific macro script for data copying in a specific format
    By Amit1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2014, 12:36 AM
  2. Sorting data from specific row
    By mubashar in forum Excel General
    Replies: 2
    Last Post: 07-14-2013, 01:00 PM
  3. Excel 2007 : Sorting by specific data with cells
    By chris108 in forum Excel General
    Replies: 2
    Last Post: 09-28-2010, 07:25 PM
  4. [SOLVED] Sorting specific data from one sheet to another
    By JOUIOUI in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2006, 07:10 PM
  5. [SOLVED] Sorting specific data
    By [email protected] in forum Excel General
    Replies: 3
    Last Post: 06-10-2005, 01:05 PM

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