Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

paste a variable value into a cell?

Status
Not open for further replies.
Dec 13, 2002
109
GB
Hi

Is it possible to assign a variable value to a specific cell in a workbook?

For example in workbook "a" i want to paste generated variables into cells a1,a2,a3,a4,a5,a6.

In my vbscript i am generating variables in a loop such as:

for i = 1 to 6
variable = i + 1
<paste &quot;variable value&quot; into <cell ax>
next i

the variable i accounts for the cell ranges a1 - a6
<cell ax> will range from a1 - a6

Cheers

Bill
 
You just want to assign 1,2,3,4,5,6 - ie a data series to cells A1:A6?

No need for loops, two lines of code will do.

Code:
[a1] = 1
Range(&quot;A1:A6&quot;).DataSeries
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top