Hi,
The below code allows a user to double click a cell and the range below that cell called (varrange) will turn grey if there is a number in the cell, and the value of each cell is then copied to another table.
What I'm having trouble with is that if ALL the cells in the range (varrange) are already coloured grey (14013909) then I'd like to make the cell colour none and also remove the contents of the other table. The problem is that it looks at one cell at a time, I'm not sure how to look at all the cells in (varrange) before moving onto the next part.
If Intersect(Target, Range("D10:I10")) Is Nothing And Intersect(Target, Range("L10:L10")) Is Nothing And Intersect(Target, Range("R10:R10")) Is Nothing Then
Cancel = True
Else
Set varrange = Target.Resize(POIDTBLlr1 - 9, 1)
For Each cell In varrange
If Not IsNumeric(cell) Then
Cancel = True
'IF ALL CELLS IN varrange ARE GREY THEN
'cell.Interior.Color = 14013909 Then
'cell.Interior.Color = xlNone
'cell.Offset(0, 30).ClearContents
ELSE
cell.Interior.Color = 14013909
cell.Offset(0, 30) = cell.Value
End If
Next
End If
Any ideas or input would be great, thanks
Bookmarks