View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Matt G[_6_] Matt G[_6_] is offline
external usenet poster
 
Posts: 1
Default Anyone Well-versed in loop?

I am working in VB Editor trying to write a command that will get th
below commands to work in increments of four but have had no success.

The below is sample of the commands I wrote that take data from sheet
and copy it to sheet2 in my desired format.

It is essentially 1 line of data from sheet1 moving into four lines o
sheet2.


Range("C2").Select
ActiveCell.FormulaR1C1 = "=Entry!R[-0]C"
Range("C3").Select
ActiveCell.FormulaR1C1 = "=Entry!R[-1]C"
Range("C4").Select
ActiveCell.FormulaR1C1 = "=Entry!R[-2]C"
Range("C5").Select
ActiveCell.FormulaR1C1 = "=Entry!R[-3]C"
Range("C5").Select

Range("D2").Select
ActiveCell = 100
Range("D3").Select
ActiveCell = 110
Range("D4").Select
ActiveCell = 120
Range("D5").Select
ActiveCell = 130
Range("D5").Select

I am trying to find away to make these Row 3 numbers variable.


Any suggestions?
Mat

--
Message posted from http://www.ExcelForum.com