Results 1 to 3 of 3

Thread: Need help on Excel VBA

  1. #1

    Need help on Excel VBA



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi Guru's

    Could someone help me with VBA coding for the following :

    Cell "B2" is Less Than "B3"
    Cell "B3" is Greater Than "B2" but Less than "B4"
    Cell "B4" is Less than "B2" and "B3".

    Also to check if these cells "" or 0 then Inbox to enter a value.

    Thanks.

  2. #2
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,819
    Articles
    0
    Excel Version
    O365
    I am not sure I have understood you perfectly but

    Code:
    If Range("B2").Value < Range("B3").Value Or _
       (Range("B3").Value > Range("B2").Value And Range("B3").Value < Range("B4").Value) Or _
       (Range("B4").value < Range("B2").Value And Range("B4").Value < Range("B3").Value) Or _
       Range("B2").Value = 0 Or Range("B3").Value = 0 Or Range("B4").Value = 0 Then
       myValue = InputBox("Input a value","App Title")
    ...
    End If

  3. #3
    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •