vendredi 18 janvier 2019

Is there a way to add up multiple "NOT" in this IF statement

Hey there smart people,

I hope the title of my question is fitting enough, i tried my best ^^

I try to comepare 2 rows from Column A to Z and check if they have the same pattern inside. With pattern I mean that if in row 1 column A anything is written then there must also be something written in row 2 column A. alternatively both can be empty.

Sounds simple but The if Statement is only allowed to be executed if the pattern DOESNT match so: something written in A1 and nothing written in A2.

Iam sure that I use just a to complicated method but even ater googling the issue I cant find a fitting, simple solution.

Iam sure its a piece of cake for you guys but i just cant figure out how to structure it. (maybe a friday specific issue ;))

(I the code i skipped the loop part since i guess its unnecessary for the problem)

                If Not (A1 = "" And A2 = "") Or Not (Not A1 = "" And Not A2 = "") Then
                    Boolean = False
                End If

Aucun commentaire:

Enregistrer un commentaire