to all
Is there a way of checking when the 1st cell in a range is used see below
Is there a way of checking when the 1st cell in a range is used see below
VBA Code:
Sub macro1()
Dim rgcurrentrw As Range
Set rgcurrentrw = ActiveSheet.Range("A2:E2")
Dim strout As String
'what I have currently
For Each cell In rgcurrentrw
strout = strout & "," & cell.Value
Next cell
Debug.Print strout
'I get strout ,aa1,bb1,1,2,3
'but I want aa1,bb1,1,2,3 ie no comma from the 1st cell
'someting like
If 1stcell in range rgcurrentrw then
strout = cell.Value
Else
strout = strout & "," & cell.Value
End If
End Sub