+ Reply to Thread
Results 1 to 5 of 5

If / ElseIf within For Each?

  1. #1
    Registered User
    Join Date
    06-26-2014
    Location
    Newark, Delaware
    MS-Off Ver
    2010 Excel
    Posts
    13

    If / ElseIf within For Each?

    Hey guys, I'm looking to put a few if/elseif conditions within a for each loop. Is this possible/ any suggestions as to how I can get it to work?

    Sub rating()

    Please Login or Register  to view this content.
    Thanks for the help!

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: If / ElseIf within For Each?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-26-2014
    Location
    Newark, Delaware
    MS-Off Ver
    2010 Excel
    Posts
    13

    Re: If / ElseIf within For Each?

    Awesome thank you! But I keep getting a runtime error '9'

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: If / ElseIf within For Each?

    If it is on this line
    Please Login or Register  to view this content.
    You do not have a sheet name "Orig File". Make sure you have the name on sheet collection and spelling is correct.

  5. #5
    Registered User
    Join Date
    06-26-2014
    Location
    Newark, Delaware
    MS-Off Ver
    2010 Excel
    Posts
    13

    Re: If / ElseIf within For Each?

    Ahh okay that fixed it, thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Code stepping in to elseif statement when elseif is definitely not true
    By DFrank231 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-13-2013, 05:31 PM
  2. If Elseif elseif problem
    By tjbillund in forum Excel General
    Replies: 3
    Last Post: 08-10-2011, 07:02 AM
  3. [SOLVED] Re: IF..Then..ELSE.. ELSEIF
    By rjamison in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2005, 08:05 PM
  4. [SOLVED] IF..Then..ELSE.. ELSEIF
    By ole_ in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-20-2005, 11:06 AM
  5. If, ElseIf
    By mast in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2005, 09:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1