Array with formulas

Darren Smith

Well-known Member
Joined
Nov 23, 2020
Messages
631
Office Version
  1. 2019
Platform
  1. Windows
Hi All

My array below works fine except it will not transfer any of my formulas??
Can somebody tell me why?



VBA Code:
Private Sub Body_Type_Change()

TurnOff

Dim wsSource  As Worksheet, wsDest As Worksheet
Dim Arr As Variant
Dim i As Long
Dim cmb As ComboBox
Dim RowCount As Long, ColumnCount As Long

Set wsSource = ThisWorkbook.Worksheets("Tippa Body Groups")
Set wsDest = ThisWorkbook.Worksheets("Job Card Master")
Set cmb = Me.Body_Type

Select Case cmb.Value

Case ("Tippa")
Arr = wsSource.Range("A13:O299")

Case ("Tippa with STD Cage")
Arr = wsSource.Range("Q13:AE299")

End Select
For i = LBound(Arr, 1) + 1 To UBound(Arr, 1)
       Arr(i, 1) = Arr(i, 1)
       Next i
        
      RowCount = UBound(Arr, 1)
      ColumnCount = UBound(Arr, 2)
      wsDest.Range("A13").Resize(RowCount, ColumnCount).Value = Arr
      
      
       TurnOn
       
End Sub
 

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)
Maybe: Arr = wsSource.Range("A13:O299").Formula
 
Upvote 0
Thanks for your reply
It brings the formulas over but does not show the result in the cells??
 
Upvote 0
wsDest.Range("A13").Resize(RowCount, ColumnCount).Formula= Arr
 
Upvote 0
Solution

Forum statistics

Threads
1,214,591
Messages
6,120,428
Members
448,961
Latest member
nzskater

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