Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I'm trying to look at all rows in a worksheet. If the value in column C has the word case in it, I want to copy it to a new workbook.
The macro does create a new workbook, but nothing gets copied over. I could use some help. Thanks! Jeff Sub JustcaseWorkbook() ' ' JustcaseWorkbook Macro Dim i As Integer, shName As String Dim rowData As Range, rowXAxis As Range Dim chtTitle As Range Workbooks.Add Windows("LABELINVENTORY7-20-2011 (1).xls").Activate ' shName = "Sheet1" Set rowData = Sheets(shName).Range("a5:c5") For i = 5 To 194 If Range("A" & i).Value Like "*case*" Then ActiveSheet.Range(Cells(1, i), Cells(3, i)).Select Selection.Copy Windows("Book2").Activate Range("A" & i).Select ActiveSheet.Paste Windows("LABELINVENTORY7-20-2011 (1).xls").Activate End If Next i Windows("LABELINVENTORY7-20-2011 (1).xls").Activate Sheets(shName).Activate Range("a1").Activate End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying selected data and headings | Excel Discussion (Misc queries) | |||
Copying only selected items to another worksheet | Excel Worksheet Functions | |||
Copying Selected Rows From Workbook1 to WorkBook2 | Excel Discussion (Misc queries) | |||
Copying Selected Rows From Workbook1 to WorkBook2 | Excel Discussion (Misc queries) | |||
Copying selected rows to another sheet | Excel Worksheet Functions |