Search all vba, im really in need of help, please help me
Goals:To display C,D,E and the rest of the column at the at row if any of it is entered at the textbox. Even though there are 2 same variables, for example the date, both rows and columns information can be displayed at a textbox,label or msgbox. I really need help with this as its a proj assignement.
Problem: i have to search all the values in Sheet1, there's where all my information are in, for the problem that is if there is 2 or more same values i cannot get the answers i want. In sheet 2, i have a textbox which determines the value. I have around 4000 cells information already keyed in Sheet1. So i have to extract them out.
C D E F G
US 5,843,808 Jan 11, 1996 US 08/585, 134 Jan 11, 1996 Grant US5843808 A Dec 1, 1998
US 6,111,324 Feb 5, 1998 US 09/020,903 Feb 5, 1998 Grant US6111324 A Aug 29, 2000
US 6,284,569 Feb 5, 1998 09/020,903, US 09/309,248 May 10, 1999 Grant US6284569 B1 Sep 4, 2001
US 6,229,200 Jun 10, 1998 US 09/095,803 Jun 10, 1998 Grant US6229200 B1 May 8, 2001
US 6,242,281 Jun 10, 1998 09/020,903, US 09/363,249 Jul 28, 1999 Grant US6242281 B1 Jun 5, 2001
US 6,498,099 Jun 10, 1998 09/095,803, US 09/288,352 Apr 8, 1999 Grant US6498099 B1 Dec 24, 2002
US 7,482,690 Jun 10, 1998 10/757,499, US 11/071,737 Mar 3, 2005 Grant US7482690 B1 Jan 27, 2009
US 6,285,075 Nov 2, 1998 US 09/184,787 Nov 2, 1998 Grant US6285075 B1 Sep 4, 2001
US 6,326,678 Sep 3, 1993 US 08/116,305 Sep 3, 1993 Grant US6326678 B1 Dec 4, 2001
US 6,294,100 Jun 10, 1998 09/288,352, US 09/454,794 Dec 3, 1999 Grant US6294100 B1 Sep 25, 2001
US 6,635,957 Jun 10, 1998 09/288,352, US 09/802,679 Mar 9, 2001 Grant US6635957 B2 Oct 21, 2003
US 6,933,594 Jun 10, 1998 09/095,803, US 09/802,678 Mar 9, 2001 US 2001/0008305 A1 Grant Jul 19, 2001 US6933594 B2 Aug 23, 2005
US 8,330,270 Jun 10, 1998 09/095,803, US 11/008,593 Dec 9, 2004 Grant US8330270 B1 Dec 11, 2012
US 6,585,905 Jun 10, 1998 09/095,803, US 10/115,228 Apr 3, 2002 Grant US6585905 B1 Jul 1, 2003
US 6190943 Jun 8, 2000 US 09/589,197 Jun 8, 2000 Grant US6190943 B1 Feb 20, 2001
US 8,071,426 May 22, 2008 12/154’483’ US 12/838,252 Jul 16, 2010 US 2010/0311208 A1 Grant Dec 9, 2010 US8071426 B2 Dec 6, 2011
US6326700 Aug 15, 2000 09/ 639,202 US 09/639,202 Aug 15, 2000 Grant US6326700 B1 Dec 4, 2001
US 6,429,048 Dec 5, 2000 US 09/730,440 Dec 5, 2000 Grant US6429048 B1 Aug 6, 2002
US 6,545,347 Mar 6, 2001 US 09/799,968 Mar 6, 2001 Us 2002/0125559 A1 Grant Sep 12, 2002 US6545347 B2 Apr 8, 2003
this is the information in sheet 1
this is my code.
what works is that i can only display 1 row and columns variables not 2 or more
Private Sub searchCommandButton_Click()
Dim firstfound As String
Dim FoundCell As Range, rng As Range
Dim myRange As Range, LastCell As Range
Dim fnd As String
Dim iRow As Long
iRow = 3
fnd = variableTextBox.Text
Set myRange = Sheets("Combined patent list").UsedRange
Set LastCell = myRange.Cells(myRange.Cells.Count)
Set FoundCell = myRange.Find(what:=fnd, after:=LastCell)
'Test to see if anything was found
If Not FoundCell Is Nothing Then
firstfound = FoundCell.Address
Else
GoTo NothingFound
End If
Set rng = FoundCell
'Loop until cycled through all unique finds
Do Until FoundCell Is Nothing
'Find next cell with fnd value
Set FoundCell = myRange.FindNext(after:=FoundCell)
'Add found cell to rng range variable
Set rng = Union(rng, FoundCell)
'Test to see if cycled through to first found cell
If FoundCell.Address = firstfound Then Exit Do
Loop
Do
DoEvents
iRow = iRow + 1
Loop Until fnd = Sheets("Combined patent list").Cells(iRow, 3) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 4) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 5) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 6) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 7) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 8) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 9) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 10) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 11) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 12) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 13) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 14) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 15) Or variableTextBox.Text = Sheets("Combined patent list").Cells(iRow, 16)
TextBox2.Text = Sheets("Combined patent list").Cells(iRow, 3)
TextBox3.Text = Sheets("Combined patent list").Cells(iRow, 4)
TextBox4.Text = Sheets("Combined patent list").Cells(iRow, 5)
TextBox5.Text = Sheets("Combined patent list").Cells(iRow, 6)
TextBox6.Text = Sheets("Combined patent list").Cells(iRow, 7)
TextBox7.Text = Sheets("Combined patent list").Cells(iRow, 8)
TextBox8.Text = Sheets("Combined patent list").Cells(iRow, 9)
TextBox9.Text = Sheets("Combined patent list").Cells(iRow, 10)
TextBox10.Text = Sheets("Combined patent list").Cells(iRow, 11)
TextBox11.Text = Sheets("Combined patent list").Cells(iRow, 12)
TextBox12.Text = Sheets("Combined patent list").Cells(iRow, 13)
TextBox13.Text = Sheets("Combined patent list").Cells(iRow, 14)
TextBox14.Text = Sheets("Combined patent list").Cells(iRow, 15)
TextBox15.Text = Sheets("Combined patent list").Cells(iRow, 16)
It seems that I can't put the
It seems that I can't put the founded code here, I get the message that it's spam!?
Search all vba, im really in need of help, please help me
As far as I can see, is that you have put code outside your loop. Try to put all inside of your loop.
Search all vba, im really in need of help, please help me
There are still some errors when i run it.\ but it is already looping. For examples, i cannot get the first value when it ran and keeps looping when the textbox is empty and i cant extract the data out
Can you sent me an example of
Can you sent me an example of your worksheet? Here's my email: anita.rodrigus@telenet.be