• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

If checking with multiple strings and numbers using vba

Abdulassees

New Member
Hi Team,

I am looking for a solution for multiple criteria for strings in If condition. I have completed one condition in the attached sheet, however looking or multiple criteria.

For Example in the attached sheet when I click on the command button

1. I need to have todays date - column H in Column I. ( I have done this)
2. If Column I greater than 150 days and not equal ' Sent' , 'Delivered' or 'shared' need to show blank. Here I am able to do only one criteria ie: sent' . Likewise I need to check not equal Deliver and shared.

Please help.

Regards,
Azees.
 

Attachments

  • IfChecking_multiple text criteria.xlsm
    24.3 KB · Views: 5
Don't really need a macro for this. In I2 put this formula:
=IF(ISNUMBER(H2),TODAY()-INT(H2),"")

In J2:
=IF(OR(G2={"Sent","Delivered","Shared"},I2<150),"","Action Required")

Now your data will always be up to date, and don't have to keep running the macro.
 
Back
Top