Terranova1340
New Member
- Joined
- Apr 21, 2018
- Messages
- 1
Hi all hoping someone on here can give me a slap to the head and tell me what I am doing wrong.
I am trying to write and Index Match formula and I am running into an issue where I cannot pass the formula variables IE Sheet names
The code above works IF I replace the following code with the actual sheet name
So when written like this: It works fine
I have spent quite a few hours playing with it and for the life of me I cannot figure out what I am doing wrong. Though I am sure it is something silly.
Any help would be greatly appreciated.
I am trying to write and Index Match formula and I am running into an issue where I cannot pass the formula variables IE Sheet names
Code:
Range("D20").FormulaArray = "=INDEX(" & month_Sht_Name & "!B23:B40,MATCH('Month by Individual Analyst'!D16&'Month by Individual Analyst'!D$17,Month!$A$23:$A$40&'Month by Individual Analyst'!D$17,0))"
The code above works IF I replace the following code with the actual sheet name
Code:
" & month_Sht_Name & "
So when written like this: It works fine
Code:
Range("D20").FormulaArray = "=INDEX(Month!B23:B40,MATCH('Month by Individual Analyst'!D16&'Month by Individual Analyst'!D$17,Month!$A$23:$A$40&'Month by Individual Analyst'!D$17,0))"
I have spent quite a few hours playing with it and for the life of me I cannot figure out what I am doing wrong. Though I am sure it is something silly.
Any help would be greatly appreciated.