ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   heres one for ya.. (https://www.excelbanter.com/excel-programming/282429-heres-one-ya.html)

alan_bourne[_13_]

heres one for ya..
 

ok i need to imput a cell into an auto filter again but i have tried t
edit the code from another one but no such luck.... i need to imput
number from (customerdetails!A2) into an autofilter in row a on th
sheet (sales) column A this needs to paste another one each tim
underneath when i click a button but all i need is the macro code as
can do butons.

i have attached the file so u can see what i mean thanks for any hel
you can giv

+----------------------------------------------------------------
| Attachment filename: help.xls
|Download attachment: http://www.excelforum.com/attachment.php?postid=357484
+----------------------------------------------------------------

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com


alan_bourne[_14_]

heres one for ya..
 

??? any ideas


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/


alan_bourne[_15_]

heres one for ya..
 

??????

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com


Tom Ogilvy

heres one for ya..
 
I assume you want to match the filter criteria on the second sheet with the
filter criteria on the first sheet.

Sub MatchFilter()
Dim f1 As Filter
Set f1 = Worksheets("CustomerDetails") _
.AutoFilter.Filters(1)
If f1.On Then
If f1.Operator Then
Worksheets("Sales").Range("A16").AutoFilter _
Field:=1, Criteria1:=f1.Criteria1, _
Operator:=f1.Operator, _
Criteria2:=f1.Criteria2
Else
Worksheets("Sales").Range("A16").AutoFilter _
Field:=1, Criteria1:=f1.Criteria1
End If
Else
MsgBox "Filter on column A is not ON"
End If
End Sub

--
Regards,
Tom Ogilvy

"alan_bourne" wrote in message
...

ok i need to imput a cell into an auto filter again but i have tried to
edit the code from another one but no such luck.... i need to imput a
number from (customerdetails!A2) into an autofilter in row a on the
sheet (sales) column A this needs to paste another one each time
underneath when i click a button but all i need is the macro code as i
can do butons.

i have attached the file so u can see what i mean thanks for any help
you can give


+----------------------------------------------------------------+
| Attachment filename: help.xls |
|Download attachment:

http://www.excelforum.com/attachment.php?postid=357484|
+----------------------------------------------------------------+

------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/




alan_bourne[_16_]

heres one for ya..
 

ummm that seems to spoon up my page two but its not really wat i need.
what im after is what ever cell A2 is in "customer details" at that
current time to added into column A in "sales" to create a new entry
for another product because in other pages that i have i click a button
which automaticaly adds a product into column b and replicates its self
(as you "tom" helped me with the other day). The file is attached
above.

So cell A2 in Customer details is to be coppied to sales in column A
after it is created it then needs to place it below when i click again
on the buton.

Thanks again for all of your help

Alan Bourne


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/


alan_bourne[_17_]

heres one for ya..
 

the one b4 does work but not quite as i need it to if u c wat i mean


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/


Tom Ogilvy

heres one for ya..
 
Sub Copydata2()

Worksheets("CustomerDetails").Range("A2").Copy _
Destination:=worksheets("Sales").Cells(rows.count, 1).End(xlup)(2)
End Sub

--
Regards,
Tom Ogilvy

"alan_bourne" wrote in message
...

the one b4 does work but not quite as i need it to if u c wat i mean


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/





All times are GMT +1. The time now is 12:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com