Pennysaver and iggydarsa, thanks for your replies. Unfortunately, I don't understand much of what was in your posts.
I am very new to coding. I understand a lot of coding concepts, just not how the syntax works.
I think perhaps I should split this up into several sections so that you can better understand what I'm trying to do and I can better understand what you're telling me.
1. Let's assume that I have a list of strings somewhere on a different worksheet. In actuality, it is a list of chemical elements. Let's say it is on Sheet 3, all in Column A, and has one element in each cell. There are only 5 elements on this page, and they are Na, O, Cl, Zn, and Hg. On Sheet 1 in Column A, a user has entered a bunch of elements, several of which may be in the limited list I have in Sheet 3. What kind of statement should I use to test if any of the elements they list on Sheet 1 in Column A are contained in the list of 5 elements on Sheet 3?
2. For every element they list in Sheet 1, Column A, the user also lists the mass they have of that element in Column C, and it calculates the percentage of the total mass in Column F. Now, if the element they listed on Sheet 1 is contained in the list on Sheet 3, AND the percentage of that element is >5%, then I want to display the warning message. How do I check for these things and then display a warning message?
Iggydarsa, I think I understand your questions, and here are my answers:
1. I have a command button that the user is supposed to use to sort the data. I assumed that I could put this code into the macro code for that button so that when they click the button, it will check for these things (and perhaps display the message) as well as sort the data.
2. I think I answered that above. If not, rephrase the question.
3. The code will check if the cell value is equal to the search value. I think. :-\