Can this be done? If Yes, How?
Closed
resolehtmai
Posts
3
Registration date
Tuesday January 15, 2013
Status
Member
Last seen
February 8, 2013
-
Jan 15, 2013 at 12:32 PM
resolehtmai Posts 3 Registration date Tuesday January 15, 2013 Status Member Last seen February 8, 2013 - Feb 8, 2013 at 06:32 AM
resolehtmai Posts 3 Registration date Tuesday January 15, 2013 Status Member Last seen February 8, 2013 - Feb 8, 2013 at 06:32 AM
2 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jan 16, 2013 at 06:44 AM
Jan 16, 2013 at 06:44 AM
Do this
1. Start macro recorder
2. Go to sheet 1 and apply filters and filter data on "Yes" in column D and "Yes" in column G
3. Select all visible range
4 goto sheet 2 and paste
stop marco recoder
paste the code back here generated by macro recorder
1. Start macro recorder
2. Go to sheet 1 and apply filters and filter data on "Yes" in column D and "Yes" in column G
3. Select all visible range
4 goto sheet 2 and paste
stop marco recoder
paste the code back here generated by macro recorder
resolehtmai
Posts
3
Registration date
Tuesday January 15, 2013
Status
Member
Last seen
February 8, 2013
Feb 8, 2013 at 06:32 AM
Feb 8, 2013 at 06:32 AM
thanks for your time rizvisa1. Dint try this out yet. Will do it this weekend and let you know the results.
Jan 16, 2013 at 01:58 PM
Sub RecordedMacro()
'
' RecordedMacro Macro
'
'
Selection.AutoFilter
ActiveSheet.Range("$D$2:$G$12").AutoFilter Field:=1, Criteria1:="Yes"
ActiveSheet.Range("$D$2:$G$12").AutoFilter Field:=4, Criteria1:="Yes"
Range("B5:G12").Select
Selection.Copy
Sheets("Sheet2").Select
Range("A9").Select
Application.CutCopyMode = False
Sheets("Sheet1").Select
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Paste
Rows("13:13").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("13:13").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End Sub
Feb 2, 2013 at 05:10 PM
Feb 2, 2013 at 05:12 PM
Column D and G are hard code for filter. Column G is assumed to be last column to be copied. Read the code to understand and modify as you see fit