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

Will formula solution work for you? Please check attached...
Pawan KumarDatabase ExpertCommented:
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:


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

See attached file.

If you really want a VBA routine then I can work on it.
Kathryn TranAuthor Commented:
This works perfectly.  Thanks so much Shums for your quick and kind help !
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.