lundi 28 mai 2018

How to use the And function with the Not function in a VBA if statement

I'm very sorry if you can't understand this because i'm having a very hard time trying to explain what i'm trying to do but, basically i'm trying to make a cost sheet table that when you fill it out it will make a list based on what you mark off and if you don't pick some items then the other ones will pump up into that position.Is anyone able to tell me where I'm going wrong here? I'm trying to get it to see if a cell is greater then 0 and if another cell is not equal to the "BBQ" then i want it to say "BBQ"

If Range("'Cost Sheet'!D87", "'Cost Sheet'!D88") > 0 And Not Range("B97") = "     •     BBQ" Then
    Range("B98") = "     •     BBQ"

Aucun commentaire:

Enregistrer un commentaire