excel - If Cell to immediate Left colored, then copy contents into this cell -
this theoretical excel syntax if possible execute without vba:
if(cell immediate left = colored (or filled), copy & paste contents cell, copy & paste contents of cell above cell).
how in vba?
you'll have write surrounding code loop through cells want evaluate, crux of this:
if range("a2").interior.colorindex > xlnone range("b2") = range("a2").value else range("b1") = range("a2").value end if
the loop loop, maybe like:
for = 2 <whatever> if range("a" & i).interior.colorindex > xlnone range("b" & i) = range("a" & i).value else range("b" & - 1) = range("a" & i).value end if next
Comments
Post a Comment