Here is the VBA formula:
Sub Macro1() ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-1],STOCK!R2C1:R19562C10,HLOOKUP(R5C3,STOCK!R1C2:R2C10,2,FALSE),FALSE)"
Range("G6").Select
End Sub
Currently it can only spit out a 1 or a 0 into column G. But if I run it, it only runs for G6. How can I make it loop from G5:G305?
What I really need is for if to color the cell in F green if it is 1 and no fill if it is 0. Is this possible?
Sub Macro1() ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-1],STOCK!R2C1:R19562C10,HLOOKUP(R5C3,STOCK!R1C2:R2C10,2,FALSE),FALSE)"
Range("G6").Select
End Sub
Currently it can only spit out a 1 or a 0 into column G. But if I run it, it only runs for G6. How can I make it loop from G5:G305?
What I really need is for if to color the cell in F green if it is 1 and no fill if it is 0. Is this possible?