+ Reply to Thread
Results 1 to 4 of 4

If Then Else... selected text in a cell, help!

  1. #1
    Registered User
    Join Date
    11-22-2006
    Posts
    5

    If Then Else... selected text in a cell, help!

    Here's my code, obviously I'm using the wrong thing in the If, but I think you should be able to understand what I want:

    Sub billable_time()

    If Range("B2").Select = "none" And Range("B3").Select = "BNC" And Range("B4").Select = "Flat Fee" And Range("B5").Select = "Hourly" Then

    //my macro code...

    //possible to do an elseif? I tried..

    else

    If Range("B2").Select = "none" And Range("B3").Select = "Flat Fee" And Range("B4").Select = "Hourly" Then

    //my other macro code...

    else

    end if
    end if

    end sub


    Thanks to anyone who can help!

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Remove all .Select notations:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-22-2006
    Posts
    5
    haha, easier than I thought. Thanks a lot!

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    No problem.

+ 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