Blanchetdb
Board Regular
- Joined
- Jul 31, 2018
- Messages
- 161
- Office Version
- 2016
- Platform
- Windows
Hi
I require to reference a cell value using an IF statement. The issue is that the cell value is populated from a vlookup and when I try the IF statement, the desired result does not happen
this is the VLookup : =IFERROR(VLOOKUP(IND_LOO_Builder_ENG!L9,Position_List_ENG!2:10004,18,FALSE),"") which is located in cell AI6 and populates a value
the IF statement in VBA is
The process does not seem to recognize the value "PE" in cell AI6 but if I type the value PE in the cell without using the vlookup to populate, the process works
I require to reference a cell value using an IF statement. The issue is that the cell value is populated from a vlookup and when I try the IF statement, the desired result does not happen
this is the VLookup : =IFERROR(VLOOKUP(IND_LOO_Builder_ENG!L9,Position_List_ENG!2:10004,18,FALSE),"") which is located in cell AI6 and populates a value
the IF statement in VBA is
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range) ' Form Manipulation / Hide and Unhide rows
'Hours of Work
If Range("AI6") = "PE" Then
Worksheets("IND_LOO_Builder_ENG").Range("36:42").EntireRow.Hidden = True
Else
Worksheets("IND_LOO_Builder_ENG").Range("36:42").EntireRow.Hidden = False
End If
End sub
The process does not seem to recognize the value "PE" in cell AI6 but if I type the value PE in the cell without using the vlookup to populate, the process works