Jean-pierre
03-24-2024, 08:45 AM
Hello everyone,
thank you in advance for your support!
What should the vba code look like if I want to do an automatic data check for the file (see attachment) and output the result as a message box?
Basically, all three sheets should be checked and if errors are found, the names of the sheets + coordinates of the respective cells should be output in the message box.
The following rule applies to all sheets: if a value is missing in columns A,B,C (as in the Volume sheet), then this is an error
The following rule applies to the Sales/Volume sheet: All values in columns D-O must be positive numbers and must not be >100.
The following applies to the Costs sheet: All values in columns D-O must be negative numbers and must not be >-100.
In the case of the attached file, the error message would look like this:
Following errors found:
Sales - cell L5
Cost - cell L5
Cost - Cell I8
Volume - cell C3
who can help me here?
Thank you.
Best regards!
thank you in advance for your support!
What should the vba code look like if I want to do an automatic data check for the file (see attachment) and output the result as a message box?
Basically, all three sheets should be checked and if errors are found, the names of the sheets + coordinates of the respective cells should be output in the message box.
The following rule applies to all sheets: if a value is missing in columns A,B,C (as in the Volume sheet), then this is an error
The following rule applies to the Sales/Volume sheet: All values in columns D-O must be positive numbers and must not be >100.
The following applies to the Costs sheet: All values in columns D-O must be negative numbers and must not be >-100.
In the case of the attached file, the error message would look like this:
Following errors found:
Sales - cell L5
Cost - cell L5
Cost - Cell I8
Volume - cell C3
who can help me here?
Thank you.
Best regards!