Hi all, I'm trying to search for similar strings and display it on combo box. For instance, my data is as shown below :
FW version: 4.03x(22)
PWM (IF/OF): 230/156
SP (IF/mmHg): 415/495
SP (OF/mmHg): -91/-120
SO time (OF to IF/sec): 35
SO time (IF to OF/sec): 55
I'm trying to search for the string "FW version" and display the above data out. I couldn't use the search function to search for "FW version: 4.03x(22)" as the FW version differs from data to data. Some of my data might be:
FW version: 4.54x(21)
PWM (IF/OF): 260/160
SP (IF/mmHg): 495/995
SP (OF/mmHg): -98/-140
SO time (OF to IF/sec): 35
SO time (IF to OF/sec): 55
or
FW version: 4.67x(24)
PWM (IF/OF): 220/150
SP (IF/mmHg): 475/399
SP (OF/mmHg): -99/-110
SO time (OF to IF/sec): 45
SO time (IF to OF/sec): 25
Is there any way to display that out? I went onto the net and found something called "fuzzylookup" but I'm not sure how to execute it. Any help here?
FW version: 4.03x(22)
PWM (IF/OF): 230/156
SP (IF/mmHg): 415/495
SP (OF/mmHg): -91/-120
SO time (OF to IF/sec): 35
SO time (IF to OF/sec): 55
I'm trying to search for the string "FW version" and display the above data out. I couldn't use the search function to search for "FW version: 4.03x(22)" as the FW version differs from data to data. Some of my data might be:
FW version: 4.54x(21)
PWM (IF/OF): 260/160
SP (IF/mmHg): 495/995
SP (OF/mmHg): -98/-140
SO time (OF to IF/sec): 35
SO time (IF to OF/sec): 55
or
FW version: 4.67x(24)
PWM (IF/OF): 220/150
SP (IF/mmHg): 475/399
SP (OF/mmHg): -99/-110
SO time (OF to IF/sec): 45
SO time (IF to OF/sec): 25
Is there any way to display that out? I went onto the net and found something called "fuzzylookup" but I'm not sure how to execute it. Any help here?
Code:
Private Sub CommandButton6_Click()
On Error GoTo Errhandler
ComboBox4.TextAlign = fmTextAlignCenter
Dim SearchRange As Range
Dim FindRow As Range
Set SearchRange = Range("A1", Range("A65536").End(xlUp))
Set FindRow = SearchRange.Find("FW version: 4.03x(22)", LookIn:=xlValues, LookAt:=xlWhole)
Dim TheSheet As Worksheet
Set TheSheet = ActiveSheet
row_review = FindRow.Row
Do
DoEvents
row_review = row_review + 1
item_in_review = TheSheet.Range("A" & row_review)
If Len(item_in_review) > 0 Then ComboBox4.AddItem (item_in_review)
Loop Until item_in_review = ""
MsgBox "Complete"
Exit Sub
Errhandler:
MsgBox "Please kindly load your file, thank you."
End Sub
Last edited: