Hi,
I cannot work out what im doing wrong!
What im trying to do is copy a long list from column A and paste in several differnt columns, with the first column being the left over.
from a list in column A i need to count how many there are. then i need to take that total then minus off 10(to fill the other two columns) then it will give me the numbers of lines i need to put in the first column.
I.e.[TABLE="width: 500"]
<tbody>[TR]
[TD]0101
[/TD]
[TD]0104
[/TD]
[TD]0109
[/TD]
[/TR]
[TR]
[TD]0102
[/TD]
[TD]0105
[/TD]
[TD]0110
[/TD]
[/TR]
[TR]
[TD]0103
[/TD]
[TD]0106
[/TD]
[TD]0111
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]0107
[/TD]
[TD]0112
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]0108
[/TD]
[TD]0113
[/TD]
[/TR]
</tbody>[/TABLE]
the current code im trying to use is
i havent even started on two or three yet as i cnat even get the one to work
any help on this would be awesome!
I cannot work out what im doing wrong!
What im trying to do is copy a long list from column A and paste in several differnt columns, with the first column being the left over.
from a list in column A i need to count how many there are. then i need to take that total then minus off 10(to fill the other two columns) then it will give me the numbers of lines i need to put in the first column.
I.e.[TABLE="width: 500"]
<tbody>[TR]
[TD]0101
[/TD]
[TD]0104
[/TD]
[TD]0109
[/TD]
[/TR]
[TR]
[TD]0102
[/TD]
[TD]0105
[/TD]
[TD]0110
[/TD]
[/TR]
[TR]
[TD]0103
[/TD]
[TD]0106
[/TD]
[TD]0111
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]0107
[/TD]
[TD]0112
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]0108
[/TD]
[TD]0113
[/TD]
[/TR]
</tbody>[/TABLE]
the current code im trying to use is
Code:
Dim myRng As Range
Dim nResult As Long
Dim oneGLRnumber As Long
Dim LASTR As Integer
Dim oneGLR As Integer
Dim oneGFR As Integer
LASTR = Cells(Rows.Count, "A").End(xlUp).Row
Set myRng = Range("A2:A" & LASTR)
nResult = Application.CountIf(myRng, "*")
oneGLRnumber = (nResult - 10)
oneGFR = Range("A2")
oneGLR = oneGLRnumber
Set oneGRange = Range(oneGFR & ":A" & oneGLR)
oneGRange.Activate
Selection.Copy
Range("S1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
'twoGFR = Range("A2")
'twoGLR = Range("")
'threeGFR = Range("A2")
'threeGLR = Range("")
i havent even started on two or three yet as i cnat even get the one to work
any help on this would be awesome!