Just learning the tricks of the trade!

JJRudd

New Member
Joined
Dec 6, 2005
Messages
34
Okay, I've, searched the entire board, read through a ton of questions, but I'm am too new at Excel to completely understand some of the answers and then adapt them to my situation. :confused: :rolleyes:
This is a sample of what I have.
A B C D E F G ........Q
Name|position|Supv Name|Supv Began| hired |Last report|Proj next|
Bob | desk | Sammy | 2Feb03 |2 Feb 03| 5Feb05 |5Feb06 |

I have a formula that updates G whenever I update a date in F. It automatically bumps out G by a year. I'm wanting the program to automatically sort using column G, having the closest Projected date being on top. How can I make this happen? Each row needs to stay together. ie: A5-Q5 stays together. A6-Q6, etc. Any help would be appreciated.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
If all of your columns are already contiguous (i.e. no blank columns between), you can just click on the Z->A button at the top of the screen with your cursor in the date field (don't highlight the column or it will think that is the only thing you want to sort - just click on one cell). This will resort the spreadsheet highest date to lowest. All rows will maintain their integrity (again, as long as you only have one cell selected).

HTH,
Colbymack
 
Upvote 0
I may have mis-worded what I'm wanting. I know how to use the regular sort function. What I'm wanting is for it to automaticall sort as soon as the info in Column G changes. Using my example, if Bob completes a report today, I update column F, which would then update column G, and once I finish entering the date, I want it to automatically drop to the bottom of the list, as it's the most recently completed report.
 
Upvote 0
You can also select your entire data range and go to Data --> Sort and follow the sort prompts for your data set.
 
Upvote 0
Try searching the board for "worksheet_Selection_Change". The posts that it lists have a couple that sound familiar. There were only 23 hits when I performed this search this morning. Good luck!

Colbymack
 
Upvote 0
Copy of Flight EPR Tracker.xls
ABCDEFGHIJKLM
1Color Key:Overdue30 Days90 Days
2
3
4
5NamePos.Supv NameSupv BeganStart DateLast EvalNext EvalStatus DateDate receivedSupv SusVP SusPres SuSC/O Date
6BobbyadmnDave21-Nov-044-Jun-9720-Nov-0420-Nov-0510-Nov-0520-Nov-055-Dec-0520-Nov-05
7JanadmnDave2-Jan-053-Jul-0120-Nov-0420-Nov-0520-Nov-054-Dec-0518-Dec-051-Jan-06
8CarladmnMark17-Mar-059-Apr-8711-Dec-0411-Dec-05
9Frankhp deskDave16-Jan-0527-May-0311-Dec-0411-Dec-054-Dec-0518-Dec-051-Jan-0515-Jan-05
10Susanhp deskArthur1-Feb-053-Jun-0315-Jan-0515-Jan-064-Dec-0518-Dec-051-Jan-0515-Jan-05
11KyleadminArthur9-Feb-0516-Oct-0119-Jan-0519-Jan-0610-Nov-058-Dec-0522-Dec-055-Jan-0519-Jan-05
12Billyhp deskArthur20-Jan-0528-Aug-0116-Mar-0516-Mar-064-Nov-058-Dec-0522-Dec-055-Jan-0619-Jan-06
13JilladmnMark29-Jan-0528-May-0316-Mar-0516-Mar-0610-Nov-0517-Dec-0531-Dec-0514-Jan-0528-Jan-05
14MalcolmadmnMark3-Feb-053-Jun-0316-Mar-0516-Mar-064-Nov-0522-Dec-055-Jan-0619-Jan-062-Feb-05
Report Tracker



Okay, This is what I have. I want it to automatically resort using the Proj. C/O Dt. Whenever It changes. Making the most recently completed drop to the bottom. For example, If Bobby completes his eval today, I will change the Last Eval to today, which will then auto change the next to a year from today and turn it white. I then want all of Bobby's info to drop to the bottom of the list because the Next report will be the farthest out.
I hope I'm not just running in circles with my questions, I'm just really pretty new to codes and functions.
 
Upvote 0
You can do that with Change event code.

See the VBA help topic Worksheet Object Events

One problem I can see is if you enter a typo and click out of the cell, whoops down to the bottom, or somewhere, you go ...
 
Upvote 0
I will claim almost absolute ignorance on how this all works, but here is some code that I got to work. You would want to change the value of Range (A1:IV65536) to be the range of values that you want to have changed - this is selecting the entire worksheet.

HTH,
Colbymack

Code begins here:

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Dim RNG1 As Range


Set RNG1 = Range("A1:IV65536")
RNG1.Select
Selection.Sort Key1:=Range("H1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal


End Sub
 
Upvote 0
One more thing - in my post above, it was sorting on column H (indicated by the reference to H1). You will want to change that as well.

Colbymack
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top