I have multiple tabs and will be moving from one to the next. so I need to have a variable that has the tab name...so that I can use it later.
1. saved the tab name as a variable
2. want to use that saved tab name in a vlookup
2a. the tab name is alaska
2b. the chart that is being pulled from has alaska as its main filter
but when I try to use my variable name in the vlookup formula, it shows up as all caps (ALASKA) and it get a #NAME error
I am sure it is just a small typo that is causing the issue. thank you in advance
1. saved the tab name as a variable
2. want to use that saved tab name in a vlookup
2a. the tab name is alaska
2b. the chart that is being pulled from has alaska as its main filter
but when I try to use my variable name in the vlookup formula, it shows up as all caps (ALASKA) and it get a #NAME error
VBA Code:
Dim TabName As Variant
TabName = ActiveSheet.Name
Range("J1").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(" & TabName & ",'summary sheet'!C1:C10,10,FALSE)"
I am sure it is just a small typo that is causing the issue. thank you in advance