View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ryan M-J Ryan M-J is offline
external usenet poster
 
Posts: 1
Default What is wrong with this For Each statement?

it throws "Type Mismatch (13)" on the "for each" line only if the range is
strings, numbers work fine, but I need it to be strings

Dim addresses As String

For Each c In IIf(Range("C3").End(xlDown), Range("C3",
Range("C3").End(xlDown)), Range("C3"))
If addresses < "" Then
addresses = addresses & ", " & c.Value
Else
addresses = c.Value
End If
Next