Solved decode this macro

October 24, 2011 at 09:24:15
Specs: Windows XP
Selection.AutoFilter Field:=4, Criteria1:="Automotive"
Selection.AutoFilter Field:=5, Criteria1:="<1/1/07"
Selection.AutoFilter Field:=8, Criteria1:="R"
Selection.AutoFilter Field:=9, Criteria1:="Yes"

what does the last line of this macro say?


See More: decode this macro

Report •


✔ Best Answer
October 24, 2011 at 12:44:52
If the data was deleted and this was left in notepad then by itself it is pretty useless, you might just as well delete it.

Stuart



#1
October 24, 2011 at 09:32:57
Like the man from Del Monte, the last line says "Yes"

Without knowing what the Maxro refers to it is impossible to say what it is supposed to do.

It looks like it is setting up a filter for a database search but that is only a guess We would need to know what Fields 4,5,7,anfd 9 relate to to have any idea.

Stuart


Report •

#2
October 24, 2011 at 09:48:13
Private Sub CommandButton2_Click()
Call Resetcolumns
Selection.AutoFilter Field:=4, Criteria1:="Automotive"
Selection.AutoFilter Field:=5, Criteria1:="<1/1/07"
Selection.AutoFilter Field:=8, Criteria1:="R"
Selection.AutoFilter Field:=9, Criteria1:="Yes"
Selection.AutoFilter Field:=21, Criteria1:="<>", Operator:=xlAnd, _
Criteria2:="<>NULL"
Range("A4:AF1200").Select
Selection.Sort Key1:=Range("U4"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("U3:AF3").Select
ActiveCell.FormulaR1C1 = "% Last Year for Automotive " + Monthname
ActiveWindow.LargeScroll Up:=25
Application.ScreenUpdating = True
End Sub


this is all of the coe, does this help?


Report •

#3
October 24, 2011 at 10:22:12
It is obviously a spreadsheet macro. that is setting up and sorting columns in a spreadsheet.

Single step through the Macro and observe the results of each line than you will be able to work out what it does.,

Stuart


Report •

Related Solutions

#4
October 24, 2011 at 11:28:20
Stuart,
the data has been deleted and this code was left in a notepad

Selection.AutoFilter Field:=9, Criteria1:="Yes"

This must say... filter the 9th column of the data set by...what>> im stuck on the criteria part. can you tell what the criteria= yes. means?


Report •

#5
October 24, 2011 at 12:44:52
✔ Best Answer
If the data was deleted and this was left in notepad then by itself it is pretty useless, you might just as well delete it.

Stuart


Report •

#6
October 24, 2011 at 14:22:34
"<>NULL" Guess - Not Empty. There is data there.

Report •


Ask Question