Loop through Variant filling Range

288enzo

Well-known Member
Joined
Feb 8, 2009
Messages
721
Office Version
  1. 2016
Platform
  1. Windows
I'm trying to learn more about looping and using a variant.

How close am I to getting the result

Copy of 2021_CertReadinessReport_ASE_AudiSouthern_10162021.xls
A
1Area 80
2Area 82
3Area 82a
4Area 82b
5Area 83
6Area 83a
Sheet1


VBA Code:
Sub yetanothertest()
Dim rng As Range, m As Long, Var As Variant
Var = Array("Area 80", "Area 82", "Area 82a", "Area 82b", "Area 83", "Area 83a")
Set rng = Range("A1")
For m = 1 To 6
Range("A" & m).Value = Var
Next m
End Sub

Thank you
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,214,877
Messages
6,122,051
Members
449,064
Latest member
scottdog129

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