Inserting variables into existing Excel formulas

AG355

New Member
Joined
Mar 3, 2022
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
I've done some VBA before but am by no means proficient. I don't even know where to start with this

I have a quote file which consists of a summary page and a worksheet for the part being quoted. The summary worksheet consists of a single row that pulls specific costs from the part worksheet. However, quotes can be for a single part or multiple. When multiple parts are involved the first part worksheet is copied, renamed appropriately, and then completed.

On the summary sheet what I have to do currently in the multiple part scenario, is copy and paste the summary row for the first part into subsequent rows and then manually go into each of the 11 formulas and change the worksheet name to reference the next part information. This is tedious, time consuming and prone to errors.

I have set up each worksheet name as a variable but can't figure out how to insert that variable into the existing 11 formulas so it references that worksheet. The only thing I can find is incorporating a formula into VBA to do a calculation, not inserting the variable into an existing formula.

Thanks in advance.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Perhaps have a look at the INDIRECT function?
 
Upvote 0

Forum statistics

Threads
1,215,674
Messages
6,126,140
Members
449,294
Latest member
Jitesh_Sharma

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top