gvilbis
asked on
how do i displaying all rows which column "Q" minus column "II" > 0 in Macro Excel 2007 VB?
i have the following code and i would like to add condition to display the rows that column "Q" minus Column "II" > 0:
Set wbResult = Workbooks.Open(Filename:=T hisWorkboo k.Path & "\Master Book.xlsm", Password:="White1022", ReadOnly:=True)
RowInd = 2
For i = 2 To Workbooks(wbResult.Name).W orksheets( "Sheet1"). Range("A2" ).CurrentR egion.Rows .Count
If Workbooks(wbResult.Name).W orksheets( "Sheet1"). Range("AN" & i) <> "" Then
Workbooks(wbResult.Name).W orksheets( "Sheet1"). Range(Cell s(i, 1), Cells(i, 106)).Copy ThisWorkbook.Worksheets("S heet1").Ra nge("A" & RowInd)
ThisWorkbook.Worksheets("S heet1").Ra nge("A" & RowInd) = i
RowInd = RowInd + 1
End If
Next i
Set wbResult = Workbooks.Open(Filename:=T
RowInd = 2
For i = 2 To Workbooks(wbResult.Name).W
If Workbooks(wbResult.Name).W
Workbooks(wbResult.Name).W
ThisWorkbook.Worksheets("S
RowInd = RowInd + 1
End If
Next i
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.