Hi
I'd like to change the colour of the font in column A in specific cells to white, depending on the cells which are populated in column C.
I wrote a simple macro which copies data from Sheet 2 to Sheet 1 - please find below the scenario:
Sheet 2 has the values 4, 5 and 6 in cells A1, A2, and A3, respectively, like this:
[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 1 has the values 1, 2, and 3 in cells B2, B3, and B4, like this:
[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[/TR]
</tbody>[/TABLE]
The macro goes to the bottom of the range in column B and offsets 2 rows and inserts a title for the data brought in from Sheet 2.
It then copies the data from Sheet 2 into Sheet 1, below the title just inserted in Sheet 1.
In this case, the data from Sheet 2 is inserted into cells B7, B8 and B9.
Now this is the missing part: I'd like to make the font in cells A7, A8, and A9, white.
If A10 was populated with data from Sheet 2, then I'd want to make the font in A10 white, as well.
Please find below the code - I'd be grateful if someone could clarify what I need to add to the code.
TIA
I'd like to change the colour of the font in column A in specific cells to white, depending on the cells which are populated in column C.
I wrote a simple macro which copies data from Sheet 2 to Sheet 1 - please find below the scenario:
Sheet 2 has the values 4, 5 and 6 in cells A1, A2, and A3, respectively, like this:
[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 1 has the values 1, 2, and 3 in cells B2, B3, and B4, like this:
[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[/TR]
</tbody>[/TABLE]
The macro goes to the bottom of the range in column B and offsets 2 rows and inserts a title for the data brought in from Sheet 2.
It then copies the data from Sheet 2 into Sheet 1, below the title just inserted in Sheet 1.
In this case, the data from Sheet 2 is inserted into cells B7, B8 and B9.
Now this is the missing part: I'd like to make the font in cells A7, A8, and A9, white.
If A10 was populated with data from Sheet 2, then I'd want to make the font in A10 white, as well.
Please find below the code - I'd be grateful if someone could clarify what I need to add to the code.
TIA
Code:
Sub CopyOffsetPaste()
Sheet1.Activate
Range("b2").End(xlDown).Offset(2, 0).Select
ActiveCell.Value = "Let's get this party started!"
Sheet2.Activate
Range("a1", Range("a1").End(xlDown)).Copy
Sheet1.Activate
Range("b2").End(xlDown).Offset(3, 0).PasteSpecial xlPasteAll
End Sub