It will indeed find the LSIL.
In the attachment I posted (I understand you not wanting to open it) it had one example of where a cell contains the text ;;;LSIL- CIN1/HPV (with all the semi colons). I assume from your code that it'll be able to see LSIL which is the bit I'd be interested in and do what I wanted it to do.
in the code:
Do
If ActiveCell.Offset(iRow, 0).Value Like "*" & Criteria1 & "*" Then ActiveCell.Offset(iRow, 1).Value = "LG"
If ActiveCell.Offset(iRow, 0).Value Like "*" & Criteria2 & "*" Then ActiveCell.Offset(iRow, 1).Value = "LG"
If ActiveCell.Offset(iRow, 0).Value Like "*" & Criteria3 & "*" Then ActiveCell.Offset(iRow, 2).Value = "HG"
iRow = iRow + 1
Loop Until iRow = iTotalRows - 1
each if/statement will overwrite the ones above it. So if the cell contains Criteria1 and Criteria3, the results will be Criteria3 (i.e. "HG").
However in the cell below it is another text which is ;;;LSIL- CIN1/HPV;ASC-H
ASC-H has a higher priority than LSIL (they're in reference to types of cancers) so that would have to take preference. Is it possible to manipulate the code in some way so that if it sees one thing such as LSIL it would assign one code such as LG (low Grade) but if it sees a combination with both LSIL AND ASC-H (High Grade) then ASC-H would take preference and HG would duly be assigned into the column.
I hope that helps. Let me know.
-Ikaabod
Bookmarks