+ Reply to Thread
Results 1 to 6 of 6

If function using VBA

  1. #1
    Registered User
    Join Date
    12-20-2011
    Location
    Sharjah UAE
    MS-Off Ver
    Excel 2010
    Posts
    3

    If function using VBA

    Hey guys!
    I need to make an input box with the following if function:
    If the input value is less than or equal to the value of the cell situated 3 cells to the right from the active cell, than make the value of active cell equal to the quantity that the user has input, otherwise, the window popup has to say "Not enough quantity" and show the amount available (which is again 3 cells to the right from the active cell), and after the user presses ok, go back to the input box to repeat the procedure.
    It is used for stock check-out.



    Please Login or Register  to view this content.
    Thank you in advance.
    Anton.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: If function using VBA

    in VBA, IIF is the replacement of IF. Or you can sue SELECT CASE statement.

  3. #3
    Forum Contributor
    Join Date
    05-09-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    315

    Re: If function using VBA

    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: If function using VBA

    And here's the shorter version:

    Please Login or Register  to view this content.
    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  5. #5
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: If function using VBA

    Hi

    Making it loop until the criteria is met.

    Please Login or Register  to view this content.
    rylo

  6. #6
    Registered User
    Join Date
    12-20-2011
    Location
    Sharjah UAE
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: If function using VBA

    Quote Originally Posted by rylo View Post
    Hi

    Making it loop until the criteria is met.

    Please Login or Register  to view this content.
    rylo
    Worked out perfectly! Thanks mate!

+ 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