Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Boell Fischer   on Dec 31 In MS Office Category.

  
Question Answered By: Jeffrey Washington   on Dec 31

You should be able to record a macro copy the information  (Tools-
Macro-Record). Then, look at the macro to see how it works (Tools-
Macro-Visual Basic Editor). You may get something like:

Sub Macro1()
Sheets("Sheet1").Select
Range("A1:A3").Select
Selection.Copy
Sheets("Sheet2").Select
Range("A1").Select
ActiveSheet.Paste
End Sub

To put values in an array, you can do it like this:

Sub test()
MyArray = Sheets("Sheet1").Range("a1:a3")
'This makes a 3 by 1 variant array.
Debug.Print MyArray(3, 1)
End Sub

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Read in Data from another spreadsheet Or get search suggestion and latest updates.


Tagged: