+ Reply to Thread
Results 1 to 5 of 5

Help with Sort Marco

  1. #1
    Registered User
    Join Date
    05-01-2013
    Location
    Utah
    MS-Off Ver
    Excel 2013
    Posts
    46

    Help with Sort Marco

    I have a sort macro that sorts a cells A through Q based on the values in Q. The problem I am having is I have a formula in the cells of column E that performs a caluclation based off whats in Column B. When the sort is performed the formula gets sorted with the names in column B but the formula is still referencing where the name was at before the sort. Basically if the name was in cell B12 and now is in B1 after the sort the formula in E1 points to B12 which has a different name it.

    Here is the code for the macro. I am pretty much a noob when it comes to macro's. I have also attached the spreadsheet. Any help would be most appreciated
    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Re: Help with Sort Marco

    Try this for now and wait for better code from experts:

    Please Login or Register  to view this content.
    Regards,
    tt3

  3. #3
    Registered User
    Join Date
    05-01-2013
    Location
    Utah
    MS-Off Ver
    Excel 2013
    Posts
    46

    Re: Help with Sort Marco

    Thank you for the response. It didn't work. It shifted the data rows down and left 4 rows of blanks at the top. I may not of did the code correctly.

  4. #4
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Re: Help with Sort Marco

    Try the sample in attached and click a green button.

    Regards,
    tt3
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-01-2013
    Location
    Utah
    MS-Off Ver
    Excel 2013
    Posts
    46

    Re: Help with Sort Marco

    That works great. Thank you.

+ 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 a sort marco
    By MannyLNJ in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-17-2012, 05:39 PM
  2. Run marco of a source file in the source file via marco of a master patch file
    By freeman6479 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2012, 10:55 AM
  3. Marco sort & Insert row
    By xcelwannabee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2009, 09:40 AM
  4. Auto Find/Replace + Marco sort?
    By mikeyfear in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-03-2008, 08:28 PM
  5. [SOLVED] customer sort order in a marco
    By Dennis Cheung in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2005, 08:06 AM

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