copying and pasting concatenated formula

bmpreston

Board Regular
Joined
Jun 18, 2016
Messages
113
Hello all,

I've been working hard on creating a concatenated formula, which when completed does produce the proper formula, however will not process the formula.

Cell t5 is:
=CONCATENATE("='",$U$5,"/[",$U$6,"]EQUIPMENT'!$A$205")

In u5 is the folder, u6 is the filename. I'm doing this because the user will run a macro to select THEIR file on a server, then the result shows a value on that file, in cell A205.

In the cell with the concatenate is the FORMULA in plain text: (neutered for privacy)

='folder name/folder name/folder name/[excel file 2-1-2021.xlsm]EQUIPMENT'!$A$205

If I copy and paste this result to notepad and back, I get the actual answer for what is in the file, at cell a205:

$6500.00 (actual current value of 'excel file 2-1-2021.xlsm, sheet equipment cell A205')

Any help to use a VBA to 'copy and paste' to make the concatenate show up as the formula and to retrieve this value?

I have tried numerous attempts of Range("t5").copy range("t6") but this just give the ACTUAL text of the formula.

Thanks!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

aRandomHelper

Active Member
Joined
Jan 14, 2021
Messages
278
Office Version
  1. 2016
Platform
  1. Windows
Can you try this?
VBA Code:
range("t6").Formula = range("t5").Text
 

Watch MrExcel Video

Forum statistics

Threads
1,130,181
Messages
5,640,649
Members
417,159
Latest member
Mayozero

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