Function SelectRows(sheet as Sheet, startingRowNum as Long, endingRowNum as Long)
Return sheet.Range("A" & startingRowNum & ":G" & endingRowNum).Select
Dim sourceWorkbook As Workbook
Dim targetWorkbook As Workbook
Dim valueArray As Variant
Dim currentRowNum as Long
Dim startingRowNum as Long
sourceWorkbook = Workbooks.Open(" path to copying book ")
targetWorkbook = Workbooks.Open(" path to destination book ")
sourceSheet = sourceWorkbook.Sheets("name of copying sheet")
For Each row in sourceSheet.Rows
if row.Cells(i,2).Value = "Income"
SelectRows(sourceSheet, currentRowNum, currentRowNum).Copy Destination:=targetWorkbook.Worksheets("Sheet1")
startingRowNum = currentRowNum