Change the color of a cell when it differs from a default value

UncleBajubjubs

Board Regular
Joined
Jul 11, 2017
Messages
111
Office Version
  1. 2010
Hello, I have a program used to estimate the cost of and then design large machinery. First, an estimator will enter the specifics needed for the machinery and select all the parts for its construction (motors, steel, etc.). This is all tallied up on a worksheet, "Selected Parts", and a cost is calculated so the customer can know if they want to buy it. If the customer accepts the price, then the engineers take over. They'll go through and check each piece to make sure that the machine will function, and if not, they will change out the piece for another piece that will work.

I'd like to add some formatting to highlight the cells in which the engineers change the part from the estimated value. For instance, if the estimator calls for a "50 horsepower motor" and then engineer changes it to a "60 horsepower motor", that cell is now highlighted in yellow.

I was initially looking at having a macro to copy the estimated values onto another worksheet, "Selected Parts Copy", and use conditional formatting to highlight the cells on "Selected Parts" whenever they differ from "Selected Parts Copy". However, the most complicated machines can have several hundred parts, and I'm hoping to find an easier way to do this so I do not have to manually set up conditional formatting on these hundreds of cells. Any ideas?

Thanks!
 
I just tried the macro on some dummy data and it worked properly with no errors.
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I looked through and found a couple of cells on the copy page had "#VALUE" (due to other changes I had made). With those fixed, it now properly works and highlights the needed cells. Thank you.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top