ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help!!! Code problem 1004 (https://www.excelbanter.com/excel-programming/272886-help-code-problem-1004-a.html)

pingger

Help!!! Code problem 1004
 
I am trying to run the following macro and it dies when
it reaches "Range("A(i):C(j)").Select". What am I doing
wrong? Please help.

TIA

Pingger


Dim i As Integer, j As Integer, k As Integer
i = i + 1
j = j + 1
k = k + 1
j = j + 21

Do While j < 1100
Range("A(i):C(j)").Select
Selection.Copy
Range("F(k)").Select
Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
i = j + 1
j = i + 21
k = k + 3
Loop


Dan E[_2_]

Help!!! Code problem 1004
 
Try

Range("A" & i & ":C" & j).Select
makes a string A1:C21
You'll probably also neet to change
Range("F" & k).Select

Dan E

"pingger" wrote in message
...
I am trying to run the following macro and it dies when
it reaches "Range("A(i):C(j)").Select". What am I doing
wrong? Please help.

TIA

Pingger


Dim i As Integer, j As Integer, k As Integer
i = i + 1
j = j + 1
k = k + 1
j = j + 21

Do While j < 1100
Range("A(i):C(j)").Select
Selection.Copy
Range("F(k)").Select
Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
i = j + 1
j = i + 21
k = k + 3
Loop




Bob Phillips[_5_]

Help!!! Code problem 1004
 
I responded to the other identical question posted at 21:24 - check that one
out.

--

HTH

Bob Phillips

"pingger" wrote in message
...
I am trying to run the following macro and it dies when
it reaches "Range("A(i):C(j)").Select". What am I doing
wrong? Please help.

TIA

Pingger


Dim i As Integer, j As Integer, k As Integer
i = i + 1
j = j + 1
k = k + 1
j = j + 21

Do While j < 1100
Range("A(i):C(j)").Select
Selection.Copy
Range("F(k)").Select
Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
i = j + 1
j = i + 21
k = k + 3
Loop




pingger

Help!!! Code problem 1004
 
Ahhhhhhh! Works like a charm. Thanks a million, Dan E!!!

Pingger


-----Original Message-----
Try

Range("A" & i & ":C" & j).Select
makes a string A1:C21
You'll probably also neet to change
Range("F" & k).Select

Dan E

"pingger" wrote in message
...
I am trying to run the following macro and it dies when
it reaches "Range("A(i):C(j)").Select". What am I doing
wrong? Please help.

TIA

Pingger


Dim i As Integer, j As Integer, k As Integer
i = i + 1
j = j + 1
k = k + 1
j = j + 21

Do While j < 1100
Range("A(i):C(j)").Select
Selection.Copy
Range("F(k)").Select
Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
i = j + 1
j = i + 21
k = k + 3
Loop



.



All times are GMT +1. The time now is 05:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com