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
Kathryn TranAsked:
Who is Participating?
 
ShumsDistinguished Expert - 2017Commented:
Hi Kathryn,

Will formula solution work for you? Please check attached...
Sample-Mesa_October_26_2017.xlsx
2
 
Pawan KumarDatabase ExpertCommented:
0
 
Rob HensonFinance AnalystCommented:
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
0
 
Kathryn TranAuthor Commented:
This works perfectly.  Thanks so much Shums for your quick and kind help !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.