Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm using Excel '03. Thanks for your help. I have the following macro designed to take selected info from one sheet and paste it into another. I want the macro to prompt me for the criteria to be used in the AutoFilter, grab those rows, clear the autofilter and paste those rows into my "report" sheet. Can you help? Thank you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="MyValue2" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Use the following Code...this will input it for you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Dim ValA As Variant [ValA] = MyValue2 Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="" & [ValA] & "" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub Cissy Wrote: Hi, I'm using Excel '03. Thanks for your help. I have the following macro designed to take selected info from one sheet and paste it into another. I want the macro to prompt me for the criteria to be used in the AutoFilter, grab those rows, clear the autofilter and paste those rows into my "report" sheet. Can you help? Thank you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="MyValue2" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=532000 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Use the following Code...this will input it for you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Dim ValA As Variant [ValA] = MyValue2 Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="" & [ValA] & "" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub Cissy Wrote: Hi, I'm using Excel '03. Thanks for your help. I have the following macro designed to take selected info from one sheet and paste it into another. I want the macro to prompt me for the criteria to be used in the AutoFilter, grab those rows, clear the autofilter and paste those rows into my "report" sheet. Can you help? Thank you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="MyValue2" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=532000 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Use the following Code...this will input it for you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Dim ValA As Variant [ValA] = MyValue2 Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="" & [ValA] & "" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub Cissy Wrote: Hi, I'm using Excel '03. Thanks for your help. I have the following macro designed to take selected info from one sheet and paste it into another. I want the macro to prompt me for the criteria to be used in the AutoFilter, grab those rows, clear the autofilter and paste those rows into my "report" sheet. Can you help? Thank you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="MyValue2" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=532000 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Use the following Code...this will input it for you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Dim ValA As Variant [ValA] = MyValue2 Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="" & [ValA] & "" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub Cissy Wrote: Hi, I'm using Excel '03. Thanks for your help. I have the following macro designed to take selected info from one sheet and paste it into another. I want the macro to prompt me for the criteria to be used in the AutoFilter, grab those rows, clear the autofilter and paste those rows into my "report" sheet. Can you help? Thank you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="MyValue2" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=532000 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This worked great. Thanks!
"dok112" wrote: Use the following Code...this will input it for you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Dim ValA As Variant [ValA] = MyValue2 Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="" & [ValA] & "" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub Cissy Wrote: Hi, I'm using Excel '03. Thanks for your help. I have the following macro designed to take selected info from one sheet and paste it into another. I want the macro to prompt me for the criteria to be used in the AutoFilter, grab those rows, clear the autofilter and paste those rows into my "report" sheet. Can you help? Thank you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="MyValue2" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=532000 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Use the following Code...this will input it for you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Dim ValA As Variant [ValA] = MyValue2 Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="" & [ValA] & "" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub Cissy Wrote: Hi, I'm using Excel '03. Thanks for your help. I have the following macro designed to take selected info from one sheet and paste it into another. I want the macro to prompt me for the criteria to be used in the AutoFilter, grab those rows, clear the autofilter and paste those rows into my "report" sheet. Can you help? Thank you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="MyValue2" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=532000 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Use the following Code...this will input it for you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Dim ValA As Variant [ValA] = MyValue2 Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="" & [ValA] & "" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub Cissy Wrote: Hi, I'm using Excel '03. Thanks for your help. I have the following macro designed to take selected info from one sheet and paste it into another. I want the macro to prompt me for the criteria to be used in the AutoFilter, grab those rows, clear the autofilter and paste those rows into my "report" sheet. Can you help? Thank you. Sub ReportBatch() Dim Message2, Title2 Dim MyValue2 As String Message2 = "Enter the Batch Number for Report" Title2 = "Batch Number for Report" MyValue2 = InputBox(Message2, Title2) Worksheets("Main").Activate Application.Goto reference:="R2C1" Selection.AutoFilter Selection.AutoFilter field:=2, Criteria1:="MyValue2" Range("A2:I15270").Select Selection.Copy Sheets("Batch Report").Activate Application.Goto reference:="R2C1" ActiveSheet.Paste Application.Goto reference:="R2C1" Worksheets("Main").AutoFilterMode = False Application.Goto reference:="R2C1" End Sub -- dok112 ------------------------------------------------------------------------ dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581 View this thread: http://www.excelforum.com/showthread...hreadid=532000 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel 2007 autofilter change to 2003 autofilter functionality? | Excel Discussion (Misc queries) | |||
2007 excel autofilter back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
2007 excel autofilter change back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
2007 Autofilter worse than 2003 Autofilter | Excel Discussion (Misc queries) | |||
How to Sort within AutoFilter with Protection on (and AutoFilter . | Excel Discussion (Misc queries) |