aaronRedeye
New Member
- Joined
- Dec 3, 2015
- Messages
- 2
Hi All,
This code is getting my really angry at 11:57 at night!
Can ANYONE shed any light on this?
I don't think the use of my variable within the sheet is correct so potentially that's breaking it.
Also, I'm getting a "End If with Block IF" Error message Can someone help?
'For each row in the sheet....
This code is getting my really angry at 11:57 at night!
Can ANYONE shed any light on this?
I don't think the use of my variable within the sheet is correct so potentially that's breaking it.
Also, I'm getting a "End If with Block IF" Error message Can someone help?
'For each row in the sheet....
Code:
Do Until RowNumber > lastRow
ColumnDStatus = ActiveCell.Value
If ColumnDStatus = "Exists" Then Do
'Condition for Exists
Range("E" & RowNumber).Select
LookUpresult = ActiveCell.Value
If LookUpresult = "#N/A" Then
Union(Cells(RowNumber, "C"), Cells(RowNumber, "G"), Cells(RowNumber, "H")).Select
ManualRowCount = 2
Selection = Selection.Value
Selection.Copy
Windows(MasterSheet).Activate
Sheets("Manuals").Activate
Range("A" & ManualRowCount).Select
ActiveSheet.Paste
ManualRowCount = ManualRowCount + 1
Else
[F3].Resize(, 1).EntireColumn.Insert
Range("F" & RowNumber).Select
ActiveCell.Formula = "==MATCH(C9,&MasterSheet!C:C,0)"
Range("F" & RowNumber).Select
MatchResult = ActiveCell.Value
Windows(MasterSheet).Activate
Range("R:" & MatchResult).Select
ActiveCell.Formula = "=VLOOKUP(C & MatchResult ,&DoubleClickSheet!$C$&RowNumber:$I$&RowNumber,6,FALSE)"
Range("S:" & MatchResult).Select
ActiveCell.Formula = "=VLOOKUP(C & MatchResult ,'Sample Data.csv'!$C$&RowNumber:$I$&RowNumber,7,FALSE)"
End If
'Condition for New Row
ElseIf ColumnDStatus = "New Row" Then Do
[F3].Resize(, 1).EntireColumn.Insert
'Still working on this part so pls i
End If
'End If
'Increment the row
RowNumber = RowNumber + 1
'Select the next cell in the sheet..
Range("D" & RowNumber).Select
Loop