I'm quite massively out of my depth here having never used vba before (My main role is primarily sql based), i'd like to sit down and spend a few days actually learing how all this works but i don't have days right now, hence throwing myself on your mercy!
Sub updateduration() If Worksheets("Sheet1").Range("I4").Value = "Y" Then Worksheets("Sheet1").Range("H4").Interior.ColorIndex = 43 Else If Worksheets("Sheet1").Range("J4").Value = 1 Then Worksheets("Sheet1").Range("H4").Interior.ColorIndex = 3 Else If Worksheets("Sheet1").Range("J4").Value = 0 Then Worksheets("Sheet1").Range("H4").Interior.ColorIndex = 45 End If End If End If End Sub As ugly as that probably is it works, Im now trying to adapt it so it adjusts all the cells in range H4:H34 one by one checking each if statement against the equivelant cell (i.e. range I4:I34 and range J4:34)
I've been looking at 'for each' to form an initial loop but am struggling to figure out how to specify which cells in the other ranges to look at in each iteration of the loop.
Any help or advice appreciated
L