View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Xxer Xxes Xxer Xxes is offline
external usenet poster
 
Posts: 33
Default Copy paste different size problem

Pe sâmbătă, 28 noiembrie 2020, la 03:23:03 UTC+2, Xxer Xxes a scris:

I took a little work with it , and now this code
work in Column F :

Sub Test()
Dim i As Long, n As Long
Dim varData() As Variant

With ActiveSheet
For i = 51 To 1600
If Len(.Cells(i, "F")) 0 Then
ReDim Preserve varData(n)
varData(n) = .Cells(i, "F")
n = n + 1
End If
Next
..Range("F1").Resize(UBound(varData) + 1) = _
Application.Transpose(varData)
End With
End Sub

But I need this code to bring me the number of the adress of
the row which contain data . I.m pretty shure I'll be not bother
you too soon . I dont make wishes , i just have strongly need
this very clever type of code . Many thanks .