Hi
this is in continuation to

http://www.excelforum.com/excel-prog...-is-blank.html

My data will be having Columns a,b,c,d and so on. I want to copy paste macro from d which I got from above thread. now further to that I want to filter the data in d, copy upto last visible adjacent cell and paste in other sheet.

Sub CITY()
'
' CITY Macro
'

'
Selection.AutoFilter
ActiveSheet.Range("$A$1:$D$37").AutoFilter Field:=4, Criteria1:="AP"
Range("A2:D33").Select
Selection.Copy
Sheets("STATE").Select
Range("A2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub


in range how to make selection upto last adjacent cell.MASTER2.xlsm