anotherphil
New Member
- Joined
- Jul 14, 2006
- Messages
- 29
Hello Board:
In column A I have a series of references. In column B I have either "Project" or "Pursuit". I need code to identify all references associated with "Project" and return that reference in column C. This is what I have so far. Any ideas why this doesn't work?
WR Number Type Project/Pursuit
WR# 64 Pursuit
WR# 131 Project
WR# 172 Project
WR# 188 Pursuit
WR# 545 Project
[/code] Range("B2").Select
Dim Check
Check = True
Do
If ActiveCell = "Project" Then
ActiveCell.Offset(0, -1).Select
Dim WR
WR = ActiveCell
Range("C15").End(xlUp).Select
ActiveCell.Offset(1, 0).Select
ActiveCell = WR
Check = False
ElseIf ActiveCell = "Pursuit" Then
ActiveCell.Offset(1, 0).Select
Check = False
Else
Check = True
End If
Loop Until Check = True
In column A I have a series of references. In column B I have either "Project" or "Pursuit". I need code to identify all references associated with "Project" and return that reference in column C. This is what I have so far. Any ideas why this doesn't work?
WR Number Type Project/Pursuit
WR# 64 Pursuit
WR# 131 Project
WR# 172 Project
WR# 188 Pursuit
WR# 545 Project
[/code] Range("B2").Select
Dim Check
Check = True
Do
If ActiveCell = "Project" Then
ActiveCell.Offset(0, -1).Select
Dim WR
WR = ActiveCell
Range("C15").End(xlUp).Select
ActiveCell.Offset(1, 0).Select
ActiveCell = WR
Check = False
ElseIf ActiveCell = "Pursuit" Then
ActiveCell.Offset(1, 0).Select
Check = False
Else
Check = True
End If
Loop Until Check = True