Excel VBA input data to next empty Range

Closed
Niroth Posts 1 Registration date Thursday 30 April 2015 Status Member Last seen 30 April 2015 - 30 Apr 2015 à 21:47
MaxStart Posts 338 Registration date Tuesday 3 March 2015 Status Moderator Last seen 3 July 2015 - 1 May 2015 à 08:09
HI everyone, I am excel vba stater I have crazy problem to solve. I want to input data into range j6 by use inputbox and if j6 had value next input will down to range j7. here is my code:
Sub FETCH_Data()
Dim x As Integer

x = InputBox("Enter the Code :")
Range("J6").Value = x

End Sub

What should I do next?
Related:

1 response

MaxStart Posts 338 Registration date Tuesday 3 March 2015 Status Moderator Last seen 3 July 2015 69
1 May 2015 à 08:09
Sub FETCH_Data()
Dim x As Variant
x = InputBox("Enter the Code :")
    If x <> "" Then
        If Range("J6").Value <> "" Then
            Range("J7").Value = x
        Else
            Range("J6").Value = x
        End If
    End If
End Sub