How to use text value when using an array to copy

KatyJohn

New Member
Joined
Jan 25, 2009
Messages
41
help needed

I'm trying to copy cells that are text references to other cells. How can I copy the text value and not the formula of a cell and pass it along in an array

FromRng is an array of referenced cells
ToRng is the destination


Dim FromRng, ToRng
Dim i As Integer


FromRng = Array("BI22", "BI23", "BI24", "BI25", "BI26", "BI27", "BI28", "BI29", "BI31")
ToRng = Array("B12", "B15", "B16", "B17", "B18", "C20", "F21", "B23", "C45")
For i = LBound(FromRng) To UBound(FromRng)

Workbooks("2009 Quote Form.xlsm").Sheets("Module Number Entry").Range(FromRng(i)).Copy Destination:=Workbooks(NewQuoteFile).Sheets(IntroLetter).Range(ToRng(i))
Next i
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Try

Code:
Dim FromRng, ToRng
Dim i As Integer
FromRng = Array("BI22", "BI23", "BI24", "BI25", "BI26", "BI27", "BI28", "BI29", "BI31")
ToRng = Array("B12", "B15", "B16", "B17", "B18", "C20", "F21", "B23", "C45")
For i = LBound(FromRng) To UBound(FromRng)
    Workbooks("2009 Quote Form.xlsm").Sheets("Module Number Entry").Range(FromRng(i)).Copy
    Workbooks(NewQuoteFile).Sheets(IntroLetter).Range(ToRng(i)).PasteSpecial Paste:=xlPasteValues
Next i
 
Upvote 0

Forum statistics

Threads
1,214,568
Messages
6,120,272
Members
448,953
Latest member
Dutchie_1

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