Convert Array Formula to Values

gsi07924

New Member
Joined
Apr 10, 2009
Messages
6
The following piece of code works. However, before performing the loop, I would like to select the range where I am placing the array formula and paste is as values instead of leaving the formula in the range.

Code:
Sub Macro1()
Range("A1").Select
   Do
        Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(720, 0)).FormulaArray _
 = "=QLink|Bars!'" & ActiveCell.Value & ,60,720,C,FILL'"                
        ActiveCell.Offset(0, 1).Select
        Loop Until IsEmpty(ActiveCell)
End Sub

Entering code using copy and paste special returns #N/A error as does this
Code:
Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(720, 0)).Value _
 = Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(720, 0)).Value


Begging your pardon but I am a very novice code writer. I appreciate any assistance.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi & Welcome to the Board!

What's the actual formula you are using? Write it exactly as it appears in the worksheet cells. Are you sure the first code you posted is functional (are there typos in the code as it appears in your post)? I don't think in its present state it will compile.
 
Upvote 0
Here is the array formula. It is a DDE application.

Code:
"=QLink|Bars!'" & ActiveCell.Value & ,60,720,C,FILL'"

It does compile. I put underscores in two places so it would fit in one screen. If this is against convention, please forgive me.
 
Upvote 0
Are you sure that that line isn't:

Rich (BB code):
"=QLink|Bars!'" & ActiveCell.Value & ",60,720,C,FILL'"

Note the red double quote. I have zero experience with DDE links I'm afraid - I would have thought doing a copy+pastespecial>values would fix the values or indeed using the Range.Value = Range.Value method (which you quoted in your first post). I am not sure why these wouldn't be working. What happens when you try them?
 
Upvote 0
Aye, your correction is necessary. Sorry about that.

The DDE links work when entered in my code, but I am using a lot of them so I wanted to convert them into values. When I use the above code or a copy paste special values command, instead of the values, I get an array full of #N/A errors. I even tried a Wait command during the two operations. No such luck.
 
Upvote 0
Maybe try turning off Calculation before you do the copy+pastespecial values?? I'm dubious that will make any difference but it just seems odd that the values change on copying.

Can you successfully copy+pastespecial>values if you do it manually (not using code)?
 
Upvote 0
Yes, I can manually copy and paste the values without incident. I will try switching off manual calculation.
 
Upvote 0

Forum statistics

Threads
1,215,840
Messages
6,127,219
Members
449,370
Latest member
kaiuuu

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