changing a portion of a function based on another cell

Hi, I am very new to excel so I apologize in advance for maybe not asking this correctly.. 

I honestly don’t even know if what I’m trying to do is possible but here it is. 

 

I have a cell with this function.

 

=’J:LS[BILLING-ACCOUNT-INVOICE-TEMPLATE.xlsx]Sample1′!$F$10

 

I want to be able to change the ‘BILLING-ACCOUNT-INVOICE-TEMPLATE.xlsx’ based on whatever is in cell D2 on the same sheet of the workbook. But I only want to change that part. 

 

So for example, if cell D2 says “January2019”, I want the above function to say:

 

=’J:LS[January2019.xlsx]Sample1′!$F$10

 

I have that function in several different cells, the only difference is instead of “Sample1” it might be “Sample2” or “Sample3” but the rest of the of the function would be the same. 

 

Can this even be done? I would really appreicate any help. Thanks! 

By: Megan

Leave a Reply

Your email address will not be published. Required fields are marked *