PDA

View Full Version : VBA Conditional formatting if one cell equals another cell in value



rawzone
01-05-2014, 07:34 AM
I am trying to colour a cell if it has the same value as another cell in a worksheet using VBA, there are several worksheets in the workbook and the number of rows can vary in the worksheets.
I should also let it be known that the two cells in each sheet are always in the same positions for example D5 and M12,
but the number of rows in each sheet can vary.
I should also add that I would need to select the cells by means of starting at the active cell and going down say 1 cell and across to the left three cells to choose the first cell and then down eight cells and across seven cells to choose the second cell. It has to be this way because there are a different number of rows rows in each worksheet.

Hopefully someone can construct some code to get the result to work in any workheet.

Thank you.

Richard

Bob Phillips
01-05-2014, 10:16 AM
Post the workbook so that we can see what you mean.

rawzone
01-21-2014, 06:02 AM
Post the workbook so that we can see what you mean.
Sorry that I am late coming back to you.

I found an alternate answer to the problem, thanks for responding.

Regards

Richard

SamT
01-21-2014, 08:45 AM
Can you post your solution so other guests with a similar problem can see the answer?

Thanks.