Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub trans_test()
- Workbooks("source.xlsx").Worksheets("Sheet1").Range("A1:F4").Copy Workbooks("destination.xlsx").Worksheets("Sheet1").Range("A1")
- Dim rng As Range, cell As Range
- Set rng = Workbooks("destination.xlsx").Worksheets("Sheet1").Range("A1:F4")
- For Each cell In rng
- If cell.Value <= 10 Then
- cell.Interior.Color = RGB(0, 0, 255)
- ElseIf cell.Value <= 20 Then
- cell.Interior.Color = RGB(255, 255, 0)
- ElseIf cell.Value <= 30 Then
- cell.Interior.Color = RGB(0, 255, 255)
- End If
- Next cell
- End Sub
Add Comment
Please, Sign In to add comment