View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bernie Bernie is offline
external usenet poster
 
Posts: 47
Default Macro not running correctly

I'm very new at this so I hope I explain this so it can be understood.

I have two worksheets, one worksheet contains columns of data (containing
dates), each column represents a task that each individual needs to complete.
The second worksheet is like the shortage tracker of who hasn't completed
what tasks. The task row in each worksheet is identical. In the shortage
tracker we used the formula,
=IF(UST!BH12,0,UST!$B12), this puts the name(s) of the person(s) that didn't
complete the training for that task. The tasks columns go from BH to FU. We
use an old macro that worked on another workbook but for some reason it won't
work right on this worksheet. What it is suppose to do is take the names of
the people who didn't complete the training and "push" the name to the top of
the column so the people that need the training isn't spaced out all over the
column.

Here is the first few lines of the macros from visual basic, it basically
repeats itself for each column:
Sub UPDATE()
ActiveSheet.Unprotect
Range("A4:FU4").Select
Selection.Copy
Range("A4:FU100").Select
ActiveSheet.Paste
Range("A4:A100").Select
Application.CutCopyMode = False

Range("A4:A100").Select
Selection.Sort Key1:=Range("A4"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

I'd greatly appreciate any assistance.