making lots of reference changes

Warhammer

New Member
Joined
Oct 25, 2012
Messages
8
here is the string;
='\\SERVER1\Production\Shared\KPO\Quality\teardowns\Mattress\[9A Mattress Teardown.xlsx]1'!$P$24

we need to be able to get the tab reference (the 1) to be able to be changed across multiple cells (30-50). ideally it would be able to increase numerically like a relative refrence.


help?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

ParamRay

Well-known Member
Joined
Aug 6, 2014
Messages
1,195
.
.

Supposing you declared variable i as an integer. Then you could adapt something like the following line to suit:

Range("A1").Formula = "='\\SERVER1\Production\Shared\KPO" & _
"\Quality\teardowns\Mattress\[9A Mattress Teardown.xlsx]" & i & "'!$P$24"
 
Upvote 0

Forum statistics

Threads
1,191,384
Messages
5,986,311
Members
440,017
Latest member
vasanrajeswaran

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
Top