GirishDhruva
Active Member
- Joined
- Mar 26, 2019
- Messages
- 308
Hi Everyone ,
Here i am trying to find the left-function of a particular column i,e 'A', and i did it for destination column, but i need that at last column were i would not be knowing the last column.
Sub Leftfunc()
Dim Sourcecolumn As Range
Dim Destinationcolumn As Range
Dim i As Integer
Set Sourcecolumn = Sheet1.Range("A4:A100")' i would not be knowing the range also, just i have mentioned 100 from A4
Set Destinationcolumn = Sheet1.Range("H4:H100") ' if i need at last column means how can i do that
For i = 1 To Sourcecolumn.Count
Destinationcolumn(i, 1).Value = Left(Sourcecolumn(i, 1).Value, 2)
Next i
End Sub
Thanks in prior
Here i am trying to find the left-function of a particular column i,e 'A', and i did it for destination column, but i need that at last column were i would not be knowing the last column.
Sub Leftfunc()
Dim Sourcecolumn As Range
Dim Destinationcolumn As Range
Dim i As Integer
Set Sourcecolumn = Sheet1.Range("A4:A100")' i would not be knowing the range also, just i have mentioned 100 from A4
Set Destinationcolumn = Sheet1.Range("H4:H100") ' if i need at last column means how can i do that
For i = 1 To Sourcecolumn.Count
Destinationcolumn(i, 1).Value = Left(Sourcecolumn(i, 1).Value, 2)
Next i
End Sub
Thanks in prior
Last edited: