+ Reply to Thread
Results 1 to 5 of 5

Help Reg And Function

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Help Reg And Function

    Hi,

    I have a And function but it is not in correct Logic so plz Help
    And (wsh1.Range("M" & l2).Value) > (wsh1.Range("Y" & l2).Value) Or (wsh1.Range("M" & l2).Value) < (wsh1.Range("Y" & l2).Value)

    Logic is M > Y Or M < Y

    Thnx for the Help

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Re: Help Reg And Function

    Quote Originally Posted by Leonardo1234 View Post
    Logic is M > Y Or M < Y
    Hi,

    obviously the correct logic must be M <> Y ‼

  3. #3
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Re: Help Reg And Function

    Awesome
    Great Suggestion
    Thnx Alot Sir
    Have a Great Day

  4. #4
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Re: Help Reg And Function

    Is this the Solution?
    And (wsh1.Range("M" & l2).Value) <> (wsh1.Range("Y" & l2).Value)

  5. #5
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    511

    Re: Help Reg And Function

    After reading your posts, I suggest you try the following code 4 times,
    each time active one of the commented lines and see what happens.

    Sub Learning_And_Or()
    Dim M, Y, Answer
    M = 1
    Y = 2
    
    'Answer = And(M>Y or M<Y)
    'Answer = And(M<>Y)
    'Answer = M > Y Or M < Y
    'Answer = M > Y And M < Y
    
    Debug.Print Answer
    End Sub
    Barriers are there for those who don't want to dream

+ 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. Right function, Left function, Mid function to extract values in column A
    By bjnockle in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 06-14-2020, 03:14 PM
  2. Replies: 0
    Last Post: 07-07-2018, 04:13 AM
  3. COUNTUNIQUE Function in Google Sheets; Excel lacks a direct counterpart to this function?
    By PivotTablePSHomage in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2018, 05:27 AM
  4. [SOLVED] Usage of standard functions into custom function (or user defined function)
    By tusharb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2016, 12:43 AM
  5. 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
  6. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  7. Replies: 1
    Last Post: 03-21-2012, 11:22 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