Any quick pointers on what I am missing here would be greatly appreciated.
I have dimmed a range with
And now trying to populate a column with a vlookup that uses this range
Do Until ActiveCell.Value = ""
ActiveCell.Offset(0, 1).Range("A1".Select
ActiveCell.FormulaR1C1 = "=IF(ISNA(VLOOKUP(RC6," & rngRole.Value & ",1,FALSE)),RC6,"""""
ActiveCell.Offset(1, -1).Range("A1".Select
Loop[/code][/pre]
I have tried different variations from
"=IF(ISNA(VLOOKUP(RC6,rngRole,1,FALSE)),RC6,"""")"
"=IF(ISNA(VLOOKUP(RC6,rngRole.value,1,FALSE)),RC6,"""")"
"=IF(ISNA(VLOOKUP(RC6," & rngRole & ",1,FALSE)),RC6,"""")"
"=IF(ISNA(VLOOKUP(RC6," & rngRole.Value & ",1,FALSE)),RC6,"""")"
I seem to be unable to use the value I assume to be within rngRole in the VLOOKUP.
Thanks in advance
I have dimmed a range with
Code:
Dim rngRole As Range
Filled the range
[pre][code]Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Set rngRole = Selection
Do Until ActiveCell.Value = ""
ActiveCell.Offset(0, 1).Range("A1".Select
ActiveCell.FormulaR1C1 = "=IF(ISNA(VLOOKUP(RC6," & rngRole.Value & ",1,FALSE)),RC6,"""""
ActiveCell.Offset(1, -1).Range("A1".Select
Loop[/code][/pre]
I have tried different variations from
"=IF(ISNA(VLOOKUP(RC6,rngRole,1,FALSE)),RC6,"""")"
"=IF(ISNA(VLOOKUP(RC6,rngRole.value,1,FALSE)),RC6,"""")"
"=IF(ISNA(VLOOKUP(RC6," & rngRole & ",1,FALSE)),RC6,"""")"
"=IF(ISNA(VLOOKUP(RC6," & rngRole.Value & ",1,FALSE)),RC6,"""")"
I seem to be unable to use the value I assume to be within rngRole in the VLOOKUP.
Thanks in advance