Anthony's VBA Forum
Where the knowledge is shared
Menu
Home Page
Forum Index
FAQ
Memberlist
Usergroups
Register
Profile
Messages
Login/Out
Quick Search
Advanced Search
Links
Consulting
Products
Who's Online
[
Administrator
]
[
Moderator
]
VBA array for an excel range
Anthony's VBA Forum Index
->
General Excel VBA
View previous topic
::
View next topic
Author
Message
structurer
Joined: 11 Jun 2009
Posts: 1
Posted: Thu Jun 11, 2009 7:08 am
Post subject: VBA array for an excel range
Hi,
I was trying to make two arrays from two ranges(transposing one of them) but I don't understand why it says out of range.
any clue?
Sub remplissage()
Dim k As Integer
Dim Montab() As Variant
Dim Montab2() As Variant
Dim x As Range
Montab = Worksheets("feuille").Range("B1:GG2").Value
x = application.transpose(Range("A3:B67"))
Montab2 = Worksheets("feuille").x.Value
For k = 82 To 4454
Range("tabletopleft").Offset(Montab(Cells(k, 2)), Montab2(Cells(k, 1))).Value = Cells(k, 4).Value
Next k
End Sub
Back to top
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
Anthony's VBA Forum Index
->
General Excel VBA
All times are GMT - 4 Hours
Page
1
of
1
Jump to:
Select a forum
Excel VBA
----------------
General Excel VBA
VBA on Finance and Investment
----------------
Option Pricing Models
Portfoilio Optimization
Other Finance Topics
VBA on Statistics
----------------
Probability Distributions
Monte Carlo Simulation
Regression Analysis
Announcement
----------------
Updated News
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
edit your posts in this forum
You
cannot
delete your posts in this forum
You
cannot
vote in polls in this forum
Powered by
phpBB
© 2001, 2002 phpBB Group