Hello
I am currently working on a project that requires me to send over the value of a coloured cell from one sheet to another. The code needs to search the range for that particular colour and send over the value in that coloured cell
Here is my code on that:
Public Function ColourValue(rnArea As Range, ColIndex As Long) As Range
Dim rnCell As Range, rRange As Range
For Each rnCell In rnArea
If rnCell.Interior.ColorIndex = ColIndex Then
ColourCOL = rnCell
End If
Next rnCell
End Function
Would gladly appreciate any help. Thank you
I am currently working on a project that requires me to send over the value of a coloured cell from one sheet to another. The code needs to search the range for that particular colour and send over the value in that coloured cell
Here is my code on that:
Public Function ColourValue(rnArea As Range, ColIndex As Long) As Range
Dim rnCell As Range, rRange As Range
For Each rnCell In rnArea
If rnCell.Interior.ColorIndex = ColIndex Then
ColourCOL = rnCell
End If
Next rnCell
End Function
Would gladly appreciate any help. Thank you