Link to home
Start Free TrialLog in
Avatar of Kathryn Tran
Kathryn TranFlag for United States of America

asked on

VBA to check correct data

Hello Experts,

I am looking for a VBA script to check column A_Material Name = column B_Manufacturer + column C_Model.

1.   If column A is NOT = column B + column C, please highlight these rows in yellow.
2.   If column A is  = column B + column C, please prompt a message " All data in column A_Material Name are cleared"
 
Attached is the sample.

Please help.  Thank You in Advance !
Sample-Mesa_October_26_2017.xlsx
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

ASKER CERTIFIED SOLUTION
Avatar of Shums Faruk
Shums Faruk
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Formula in column D to check:

=A2=B2&" "&C2

Result will show TRUE or FALSE

Formula in E1 to show count of errors:

=IF(COUNTIF(D:D,FALSE)=0,"All data in column A_Material Name are cleared",COUNTIF(D:D,FALSE)&" items outstanding.")

Conditional formatting on data columns to highlight yellow when column D = FALSE:

=$D2=FALSE

Applies to Range:  =$A$2:$D$27544

See attached file.

If you really want a VBA routine then I can work on it.
Sample-Mesa_October_26_2017--1-.xlsx
Avatar of Kathryn Tran

ASKER

This works perfectly.  Thanks so much Shums for your quick and kind help !