Hey Guys,
I am fairly new to VBA. I am trying to create a code that will help me do the following.
If Cells in column C have an interior colour of grey and if the cells in Column D have a value more than zero,
the value of the cell in column C will be copied and paste onto a separate sheet.
This is what I have come up with: (Its definitely wrong)
For i= 1 to 100
if (cells(c,i).Interior.Pattern = xlSolid.PatternColorIndex = xlAutomatic.ThemeColor = xlThemeColorDark1.TintAndShade = -0.249977111117893 .PatternTintAndShade = 0)
and (cells(d,i) > 0) then
Range("C").CopySheets("Sheet2").SelectRange("A1").Paste
end if
end sub
There are a thousand syntax errors within what I am trying to develop. If anyone could recommend me a book such that I can learn the structure of the programming language or point me to how to solve this problem, it would really be awesome.
I have attached my trial sheet if it helps.
Thank you very much!
mylittleproject.xlsx
Bookmarks