View Single Post
  #3   Report Post  
Art Farrell
 
Posts: n/a
Default

Hi,

I assumed you have Account No.1, Account No.2, etc., starting in Column B:

Option Explicit

Sub getAccount()
Dim acct As Long

Application.ScreenUpdating = False
Sheets("Distr").Activate
acct = Application.InputBox("Pick # for account", Type:=1)
If acct = False Then Exit Sub
Worksheets.Add(After:=Worksheets(Worksheets.Count) ).Name = "Account No."
& acct
Sheets("Distr").Activate
Range("A1").CurrentRegion.AutoFilter
Selection.AutoFilter Field:=1 + acct, Criteria1:="<"
Union(Columns(1), Columns(1 + acct)).Select
Selection.Copy Sheets("Account No." & acct).Range("A1")
Selection.AutoFilter
Sheets("Account No." & acct).Select
End Sub

CHORDially,
Art Farrell


"Santed593" wrote
in message ...

I need help to create a vba code or macro to filter data based on input
box entry. In my worksheet I have 110 rows of Promo Titles. In each
column (200 columns) are dollar sales goals of promo titles by Account
No. This means that the column headings are Account No. I would to
prompt the user using the input box to enter the Account No and the
macro will filter the dollar sales goals for all promo titles of that
Account No. Once filtered I would like to copy and paste the info to a
new worksheet. I have searched and read a lot of posting about data
filtering but I can't find anything about row filtering based on column
input box entry. Any help is greatly appreciated.


--
Santed593
------------------------------------------------------------------------
Santed593's Profile:

http://www.excelforum.com/member.php...o&userid=25108
View this thread: http://www.excelforum.com/showthread...hreadid=394362