LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What's wrong with this if statement? Karen Excel Discussion (Misc queries) 5 July 19th 08 04:54 PM
can someone please tell me what i did wrong with this if statement? unclescrooge Excel Programming 2 November 12th 07 12:36 PM
IF Statement help please - again - got it wrong last time! Alan Davies Excel Worksheet Functions 2 May 12th 06 12:28 PM
wts wrong with this statement Jason Excel Worksheet Functions 2 February 24th 06 02:26 PM
What is wrong with this IF statement? need help. AC man Excel Discussion (Misc queries) 4 January 11th 06 03:29 PM


All times are GMT +1. The time now is 08:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"