Hello all,
This is my first post and I'm writing it because I couldn't find what I'm looking for anywhere else.
I need this:
In sheet 1 (which I called TEMPLATE) cell C3 I put a ticket number eg (T007) and in sheet 8 (TICKET_TRACK) all the tickets are being recorded.
The record function is working fine, what I now need is to be able to retrieve data. I created another button that is supposed to do that, but the only thing I was able to get is that it takes me to the TICKET_TRACK worksheet to where that particular ticket number is located.
I need that every time I put a ticket number in C3 on this worksheet, the macro looks up the ticket number in worksheet (TICKET_TRACK) and fills out the data in cells C3,C4,C5,C6,C7, corresponding to the name of the person, the ID, the phone number, etc.
This is what I could get till now, and it's what looks up the ticket number but I don't know how to retrieve the data:
Private Sub CommandButton9_Click()
Dim FindString As String
Dim Rng As Range
FindString = Sheets("TEMPLATE").Range("C2").Value
If Trim(FindString) <> "" Then
With Sheets("TICKET_TRACK").Range("A:A")
Set Rng = .Find(What:=FindString, _
After:=.Cells(1), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
Else
MsgBox "Nothing found"
End If
End With
End If
End Sub
Can someone out there help me please? =O
Also, it'd be cool if I could do this without having to click on a button...
Thanks in advance
This is my first post and I'm writing it because I couldn't find what I'm looking for anywhere else.
I need this:
In sheet 1 (which I called TEMPLATE) cell C3 I put a ticket number eg (T007) and in sheet 8 (TICKET_TRACK) all the tickets are being recorded.
The record function is working fine, what I now need is to be able to retrieve data. I created another button that is supposed to do that, but the only thing I was able to get is that it takes me to the TICKET_TRACK worksheet to where that particular ticket number is located.
I need that every time I put a ticket number in C3 on this worksheet, the macro looks up the ticket number in worksheet (TICKET_TRACK) and fills out the data in cells C3,C4,C5,C6,C7, corresponding to the name of the person, the ID, the phone number, etc.
This is what I could get till now, and it's what looks up the ticket number but I don't know how to retrieve the data:
Private Sub CommandButton9_Click()
Dim FindString As String
Dim Rng As Range
FindString = Sheets("TEMPLATE").Range("C2").Value
If Trim(FindString) <> "" Then
With Sheets("TICKET_TRACK").Range("A:A")
Set Rng = .Find(What:=FindString, _
After:=.Cells(1), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
Else
MsgBox "Nothing found"
End If
End With
End If
End Sub
Can someone out there help me please? =O
Also, it'd be cool if I could do this without having to click on a button...
Thanks in advance