Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 06-08-2018, 07:18 AM
Phil H Phil H is offline Modify Macro to Sort Last Four Characters Windows XP Modify Macro to Sort Last Four Characters Office 2010 64bit
Advanced Beginner
Modify Macro to Sort Last Four Characters
 
Join Date: Jun 2010
Posts: 81
Phil H is on a distinguished road
Default

Shashi, Thanks for taking the time to address my problem, much appreciated. Your solution for CommandButton1 works. Now I have to integrate it into my worksheet/format. Originally, I used the macro recorder to create the code, which does a typical ascending sort. In my post, the range of all columns and rows sorted is B3:AA39. The sort column range is G4:G39 (where the contract numbers are held).

Running the code, I get a Run-time error '1004': This formula is missing a range reference of a defined name. Clicking Debug, the "sort now" line is highlighted: Range("A4").Sort....

Column A is not used for data entry.
How to modify the code?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
custom sort macro ewso Excel Programming 7 10-10-2017 12:08 PM
Modify recorded macro to run until end of document peter961 Word VBA 1 09-04-2017 02:50 PM
Modify Macro to Sort Last Four Characters how modify a macro code tarikov2006 Excel Programming 1 11-18-2016 04:10 AM
Modify Macro to Sort Last Four Characters Macro to sort columns SerenityNetworks Excel Programming 4 09-02-2016 06:20 AM
Modify Macro to Sort Last Four Characters Sort strings by number of characters reneforster Word VBA 1 12-04-2014 07:25 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:58 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft