Thread
:
Need Unique Only in MsgBox
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Need Unique Only in MsgBox
Look here for another way
http://tinyurl.com/8pp3g
to get rid of the leading comma try
xrow=right(xrow,len(xrow)-1)
--
Don Guillett
SalesAid Software
"JMay" wrote in message
news:n7Amf.41846$_k3.40792@dukeread01...
I'm creating code that will inform me
of what rows in my range B1:F20
have been highlighted in yellow.
Extract...
Range("B1").Select
For i = 1 To NumRows
For j = 1 To NumCols
If Rng.Cells(i, j).Interior.ColorIndex = 6 Then
Tag = True
If Tag = True Then XRow = XRow & "," & CStr(i)
End If
Next j
Next i
MsgBox "Rows " & XRow & " are yellow"
End Sub
Currently my msgbox is displaying:
Rows ,3,7,9,9,9,14,18 are yellow.
It is correct - Row 9 has 3 cells
highlighted - whereas 3,7,14,& 18
have only a single cell HLed.
What can I apply to get
the msgbox to show
Rows 3,7,9,14,18 are yellow
Elimination of the leading "," would be
a bonus,
TIA,
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]