+ Reply to Thread
Results 1 to 3 of 3

If...Then...ElseIf statement

  1. #1
    Forum Contributor
    Join Date
    03-06-2013
    Location
    Salt Lake City, Utah
    MS-Off Ver
    2007, 2010
    Posts
    127

    If...Then...ElseIf statement

    Hi,

    Can anyone tell me why the following code doesn't work:

    Please Login or Register  to view this content.
    Regardless of the cell value the first "Then" condition is executing. Cell C2 has a value of 102 (the active cell) but "MA" is still being populated when it should move to the next conditional test. Any help is appreciated.

    BrownBoy
    BrownBoy

    If happy, mark "SOVLED" & add to "REP"

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: If...Then...ElseIf statement

    More like:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    03-06-2013
    Location
    Salt Lake City, Utah
    MS-Off Ver
    2007, 2010
    Posts
    127

    Re: If...Then...ElseIf statement

    JBeaucaire,

    Thanks. That did the trick.
    Last edited by JBeaucaire; 05-21-2014 at 05:36 PM.

+ 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. [SOLVED] ElseIF Statement Error
    By UsmanBPD in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-27-2012, 09:37 AM
  3. If then elseif statement
    By Mac10 in forum Excel General
    Replies: 3
    Last Post: 10-02-2010, 09:29 PM
  4. If then elseif statement help needed
    By Mac10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2010, 07:50 PM
  5. ElseIf Statement problem
    By Erik K via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-23-2005, 08:55 AM

Tags for this Thread

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