gpt4 book ai didi

vba - 复制到新工作表后用颜色填充行

转载 作者:行者123 更新时间:2023-12-04 21:03:58 24 4
gpt4 key购买 nike

我能够对我在这里和那里发现的一些编码进行最小的更改。但我很机智,所以我希望我能在这行 VBA 代码方面得到一些帮助:

With Worksheets(3)                       
Worksheets(1).Range(Worksheets(1).Cells(intCopyRow, 1), _
Worksheets(1).Cells(intCopyRow, bytColumnsInData)).Copy _
Destination:=.Cells(.Cells.Rows.Count, 1).End(xlUp).Offset(1, 0)
End With

我希望在将不匹配的行复制到新的 sheet3 后为该行添加颜色。我应该如何更改此代码以添加颜色?

最佳答案

也许添加这一行?

' colors the row Red
.Cells(.Rows.Count, 1).End(xlUp).EntireRow.Interior.Color = RGB(255, 0, 0)

关于vba - 复制到新工作表后用颜色填充行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29270603/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com