Hi all,
this is my first post so a bit about myself here:
I am working as an intern for an accounting company and they are having me attempt to automate some of their very repetitive excel work.
This is my first serious foray into VBA code but I think I am getting the hang of it.
My current code is as follow
Dim Tablarray As Range
tablearray = Selection
Sheets("Bank Transactions-Machias").Select
Range("Table3[[#Headers],[Entered in TAM]]").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP([@[Debit/Credit]],"tablarray",2,FALSE)"
The error comes in when the code tries to use "tablearray" in the vlookup saying "compile error, syntax error"
Can anyone tell me how to rewrite the vlookup so that the range is the selection?
if we can get that to work, can anyone also tell me how to "fix" (manually I would use $ signs or hit f4 if that makes it clearer) the selection so if the formula is filled down the same selection will be used in each cell?
Thanks for any help!
Bookmarks