Scuse my ignorance but am a newbie, I hope someone can help?
I want to write a macro that will select a cell by criteria Ie, what is in that cell (x), record data on the corresponding row, within certain cells only and then write it to another sheet in the same workbook beneath an existing set of rows with similar data, but into a different order of cells on the new row. I have created a button that triggers an input box so when i enter the data (x) this starts the process.
I'm sure this is simple for you folks in the know so all help would be appreciated
Regards
Dom
This is where i'm at:
Private Sub CommandButton1_Click()
Dim x As Variant, i As Integer, jobnum As String, jobval As Long
jobnum = InputBox("Insert a Job Number")
i = 0
Do
i = i + 1
Loop Until Cells(i, 1).Value = jobnum
Range("A133").Value = jobnum ' another sheet at base of selection?
End Sub
'For i = 1 To 50
'If Cells(i, 1).Value = jobnum Then
I was playing around with this - 'MsgBox ("recording new Project")
'Else: MsgBox ("Cannot Find JobNumber")
'End If
'Next i
Some issues as stated by my friends (thanks for the post), controlling user input - therefore I need to put in some kind of loop back to the beginning !!!loop within a loop!!! with a message box stating that job number not found.
next bit is copying the cells adjacent and then pasting them at the bottom of a set range on another sheet. I've read about dynamic selections but just not sure.
PLEASE ALL HAVE SYMPATHY I'M JUST 2 WEEKS INTO THIS VBA THING
Thanks Dom
