+ Reply to Thread
Results 1 to 5 of 5

Why are IFs not working?

  1. #1
    Registered User
    Join Date
    03-28-2007
    Posts
    27

    Why are IFs not working?

    Hi,
    I posted yesterday having a problem with several ifs in a sub that are not all executing. per a suggestion I went ahead and changed the locations of my end ifs. Now the only one that is executing is the first one in the sub.
    here it is:
    Any help is appreciated
    Thanks,
    Ritz
    Please Login or Register  to view this content.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524
    I belive you need to say
    if activecell.offset(0, 16) > activecell.Offset(0, 15) Then

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    When you have 'If' on more lines you need to use 'End If' instruction:

    Please Login or Register  to view this content.
    Regards,
    Antonio

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    The 3 End If statements at the end were misplaced. Try this:
    Please Login or Register  to view this content.
    Jason

  5. #5
    Registered User
    Join Date
    03-28-2007
    Posts
    27

    putting the end ifs in the right places definitely worked

    Thanks guys.
    putting the end ifs in the right places definitely worked.
    -ritz

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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