Based on the results, I need to have the VM Macro jump to a specified section. but I'm having trouble on this and need assistance if possible.
For i = 2 To lastrow
'get values from cells
Cells(i, Ext.Column).Select
prop = Cells(i, Ext.Column)
Cells(i, GSE.Column).Select
Gcode = Cells(i, G.Column)
Cells(i, prop.Column).Select
PType = Cells(i, prop.Column)
'now figure out where to go (and where I'm having trouble as it does not go where I need it to go based on the IF statement results.
'if true on all 3
if prop = "Int", Gcode = "other", PType = "SFD" then gosub INTSFD
if prop = "Ext", Gcode = "other", PType = "Other" then gosub EXTSFD
if prop = "Int", Gcode = "FN", PType = "SFD" then gosub INTFNSFD
'loop it
Loop:
next i
INTSFD:
' I'll do something here
return
EXTSFD:
' I'll do something here
return
INTFNSFD:
' I'll do something here
return
For i = 2 To lastrow
'get values from cells
Cells(i, Ext.Column).Select
prop = Cells(i, Ext.Column)
Cells(i, GSE.Column).Select
Gcode = Cells(i, G.Column)
Cells(i, prop.Column).Select
PType = Cells(i, prop.Column)
'now figure out where to go (and where I'm having trouble as it does not go where I need it to go based on the IF statement results.
'if true on all 3
if prop = "Int", Gcode = "other", PType = "SFD" then gosub INTSFD
if prop = "Ext", Gcode = "other", PType = "Other" then gosub EXTSFD
if prop = "Int", Gcode = "FN", PType = "SFD" then gosub INTFNSFD
'loop it
Loop:
next i
INTSFD:
' I'll do something here
return
EXTSFD:
' I'll do something here
return
INTFNSFD:
' I'll do something here
return