Задайте вопросЗадайте вопрос
 

ВопросMeeting And/Or Criteria with an If Statement

  • 3 августа 2008 г. 18:22Eazy-D Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     

    Hello,

     

    I have a spreadsheet in Excel 2003 with two columns of data.  Column A is labeled "Work" and Column B is labeled "Type of Work".  The macro that I have activates cell A2 and implements a Do While Loop to scroll through each row on the spreadsheet that contains data.  Inside this Do While Loop, the macro is looking for rows that meet certain criteria in columns A and B.  Column A must equal the variable work, which is defined by the user using an input box and coumn B must either contain the text "PM" or "MP".  I am trying to implement an If Then statement that looks for rows that contain the variable work in column A and either "PM" or "MP" in column B, but I don't know how to specify the or just for column B.  How would I go about doing this?

     

    Thanks.   

Все ответы