+ Reply to Thread
Results 1 to 3 of 3

If and Or function

  1. #1
    Registered User
    Join Date
    08-09-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    10

    If and Or function

    Hi I currently have an If function

    If Cells(rowval, 2).Value = "Y" Then
    [do this]
    end If

    But, now I want it so check

    if the cell = "Y" or "y" or "1" Then
    [do this]
    End if


    Is there any way to add this? I was reading up on the Or function but couldn't get it to work. Thanks

    Figured it out

    If Cells(rowval, 2).Value = "Y" or Cells(rowval, 2).Value = "y" Then
    [do this]
    end If
    Last edited by washermann; 10-20-2017 at 10:08 AM.

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: If and Or function

    Perhaps
    Please Login or Register  to view this content.
    The number 1 and text "1" would both read TRUE.
    Last edited by leelnich; 10-20-2017 at 10:16 AM.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  3. #3
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: If and Or function

    Happy to help, thanks for the rep! If complete, please mark your thread as SOLVED (Thread Tools up top). Regards -Lee

+ 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. Replies: 3
    Last Post: 08-14-2017, 06:26 AM
  2. Replies: 2
    Last Post: 04-23-2017, 12:04 AM
  3. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  4. Replies: 1
    Last Post: 06-10-2015, 12:56 PM
  5. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  6. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  7. Replies: 2
    Last Post: 03-20-2009, 01:29 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