+ Reply to Thread
Results 1 to 8 of 8

how to make "OR" work in excel vba code

  1. #1
    Registered User
    Join Date
    02-12-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    68

    how to make "OR" work in excel vba code

    Hi does anyone know how to make "OR" work in excel vba code, as every time i use it, it never seems to work!:mad

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: how to make "OR" work in excel vba code

    What do you wish to do with it?
    Please Login or Register  to view this content.
    may be one way.

  3. #3
    Registered User
    Join Date
    02-12-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: how to make "OR" work in excel vba code

    this is part of my code, which never works correctly


    Please Login or Register  to view this content.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: how to make "OR" work in excel vba code

    Hi jakeembx,
    try it
    Please Login or Register  to view this content.

  5. #5
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: how to make "OR" work in excel vba code

    If you wish to use Or you must repeat the expression for every value:
    Please Login or Register  to view this content.
    Select Case is easier for this as nilem has shown.

  6. #6
    Registered User
    Join Date
    02-12-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: how to make "OR" work in excel vba code

    thank you its kind of work not what i wanted. i did it to go to case select when a cell = 3. code below, could you tell me if i put the right case else etc.. in the right position...
    Please Login or Register  to view this content.

  7. #7
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: how to make "OR" work in excel vba code

    A little different:
    Please Login or Register  to view this content.

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: how to make "OR" work in excel vba code

    Please Login or Register  to view this content.

+ 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. Excel VBA Code to make my Toggle Buttons output "Yes" or "No" to their cells
    By mebanet in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2013, 06:14 AM
  2. Replies: 0
    Last Post: 11-20-2012, 10:22 AM
  3. If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 AM
  4. Replies: 6
    Last Post: 01-08-2006, 06:20 PM
  5. [SOLVED] Can't make Excel "if" Formula work
    By Janie Ellen in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-08-2005, 12:50 PM

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