Array with formulas

Darren Smith

Active Member
Joined
Nov 23, 2020
Messages
417
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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

mart37

Well-known Member
Joined
Aug 4, 2017
Messages
1,091
Office Version
  1. 2016
Platform
  1. Windows
Maybe: Arr = wsSource.Range("A13:O299").Formula
 

Darren Smith

Active Member
Joined
Nov 23, 2020
Messages
417
Office Version
  1. 2019
Platform
  1. Windows
Thanks for your reply
It brings the formulas over but does not show the result in the cells??
 

mart37

Well-known Member
Joined
Aug 4, 2017
Messages
1,091
Office Version
  1. 2016
Platform
  1. Windows
wsDest.Range("A13").Resize(RowCount, ColumnCount).Formula= Arr
 
Solution

Watch MrExcel Video

Forum statistics

Threads
1,129,791
Messages
5,638,337
Members
417,021
Latest member
moon miner

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