paulfitz54
New Member
- Joined
- Dec 30, 2014
- Messages
- 32
- Office Version
- 2019
- Platform
- MacOS
Hi,
I have a macro that retrieves a Job Rating of 5 from a drop-down list and places the results in a new sheet.
What I would like to do is have a message asking me for the job rating (1-5), then run the macro to copy the info to another sheet, will an input box work here? and how would I place it into the code below?
Thanks for your assistance in this
Paul
Copy of the code:
Sub JobRating5()
'
' JobRating5 Macro
' Create new worksheet with only personnel with job rating 5
'
'
Selection.AutoFilter
ActiveSheet.Range("$A$1:$G$742").AutoFilter Field:=7, Criteria1:="5"
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets.Add After:=ActiveSheet
ActiveSheet.Paste
Sheets("Job Rating").Select
Range("A3").Select
ActiveSheet.Range("$A$1:$G$742").AutoFilter Field:=7
Application.CutCopyMode = False
Range("A1").Select
Selection.AutoFilter
End Sub
I have a macro that retrieves a Job Rating of 5 from a drop-down list and places the results in a new sheet.
What I would like to do is have a message asking me for the job rating (1-5), then run the macro to copy the info to another sheet, will an input box work here? and how would I place it into the code below?
Thanks for your assistance in this
Paul
Copy of the code:
Sub JobRating5()
'
' JobRating5 Macro
' Create new worksheet with only personnel with job rating 5
'
'
Selection.AutoFilter
ActiveSheet.Range("$A$1:$G$742").AutoFilter Field:=7, Criteria1:="5"
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets.Add After:=ActiveSheet
ActiveSheet.Paste
Sheets("Job Rating").Select
Range("A3").Select
ActiveSheet.Range("$A$1:$G$742").AutoFilter Field:=7
Application.CutCopyMode = False
Range("A1").Select
Selection.AutoFilter
End Sub