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
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