Microsoft Excel – Using VBA to check values in different columns and apply formatting

Microsoft Excel LogoExcel it a complicated beast.  When I first started with spreadsheets I was always putting things in columns and rows and not doing much with it.  Since learning VBA about 15 years ago I have taken my knowledge to the Nth degree.  Recently, I ran a VBA workshop and one of the delegates asked me a question which perplexed me for a while.

“I want to be able to check two values and if they are equal then I want the “check” column to turn green and a plus sign be the value.  Oppositely if the cell values don’t match then I want the “checked” cell value to be a minus sign and the cell colour to be red.”

Seems simple doesn’t it.  Now try and do it without conditional formatting because that was my first thought too.

Continue reading Microsoft Excel – Using VBA to check values in different columns and apply formatting