Account, name, ordernumber
410027, ABC, 123
420001, XYZ, 789
where the first account number is in one sales area and the second is in another. It is not possible to add it to the original report as that imports from the system and doesn't have this data.
Some areas are easy because the accounts are in a specific range, which works like this:
If Account < 420000 Or Account > 489999 Then
(then delete selected rows etc) which returns info on account 420001 onwards. Perfect. However the area I'm working on also has a few isolated accounts which I have managed to bring up with the following:
If Account <> 400000 And Account <> 400001 And Account <> 400003 And Account <> 400005 And Account <> 400015 Then
Which deletes everything but those accounts. My question is, how do I combine the two so it brings up anything in the range plus the individual accounts? I have tried both
If Account < 420000 Or Account > 489999 And Account <> 400000 And Account <> 400001 And Account <> 400003 And Account <> 400005 And Account <> 400015 And Account Then
and
If Account < 420000 Or Account > 489999 Or Account <> 400000 And Account <> 400001 And Account <> 400003 And Account <> 400005 And Account <> 400015 And Account Then
but as it deletes everything I am wondering if this is not how it is done and hoping someone can point me in the right direction please. Thank you!
(If I can't make it work like this then I will have to propose instead of deleting rows we can inverse it and select the ones we want, but that will mean changing a lot more code)















