I pretty much recorded a macro and have decided that because of my lack of VBA skills, this would be the easiest route. However I have 2 problems with this. My range selection for VLOOKUP is not static and will change, thus I need to come up with a way to select all the same columns, but the selection needs to go to the bottom of the data set. (Also, when I fill the formula down after completing the initial VLOOKUP).
If anyone could simplify this for me, I would be grateful.
All of the above in RED essentially needs to become something that goes to the last row in the data set.
If you have the time, I would really like to know how code a VLOOKUP macro without having to use the record button. I'm really not a fan of FormulaR1C1
Thanks guys!
-STEVE
If anyone could simplify this for me, I would be grateful.
Code:
Range("Y2").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-4],'DG by Flt Totals'![B][COLOR=#ff0000]R2C13:R6982C27[/COLOR][/B],15,0)"
Range("Y2").Select
Selection.AutoFill Destination:=Range("[B][COLOR=#ff0000]Y2:Y1947[/COLOR][/B]")
Range("Z2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=RC[-11],""TRUE"",""FALSE"")"
Range("Z2").Select
Selection.AutoFill Destination:=Range("[B][COLOR=#ff0000]Z2:Z1947[/COLOR][/B]")
All of the above in RED essentially needs to become something that goes to the last row in the data set.
If you have the time, I would really like to know how code a VLOOKUP macro without having to use the record button. I'm really not a fan of FormulaR1C1
Thanks guys!
-STEVE