Consulting

Results 1 to 9 of 9

Thread: Solved: IF THEN COMMAND

  1. #1

    Solved: IF THEN COMMAND

    Good morning guys A friend of mine ask me if I used the
    IF THEN command. I have never used that command so can you send me
    the formula for the command?
    Here is an example of what I would use it in.
    if C3>B3 the result would be A3.
    Another example.
    if C3>B3 the result would be Over or Under
    I have tried to find the formula but no luck.
    Max

  2. #2
    Let's assume you want a value of zero returned when C3 is not greater than B3

    IF(C3>B3,A3,0)

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Don't mean to be rude, but I see that you have over 200 posts and you are telling me that you have never used IF?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Tenspeed,
    I notice that the last 4 threads you started are "unsolved" with no final response from yourself. I would expect you to repond to posts if you wish further assistance here.
    Regards
    MD
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    I would like to elaborate on NukedWhale's response. There is no IF THEN command . . . it's just an IF command, so if you were looking for something with a "THEN" in it, you won't find it.
    The general format is something like:
    IF( condition , "TRUE" command , "FALSE" command )
    The "TRUE command (and "FALSE" command) are actually expressions that can each be very complex in themselves. The "TRUE" command is the "THEN" part of an IF THEN logic. The "FALSE" command is the "ELSE" part of an IF THEN logic, and is optional if not needed.
    For each "IF(" string there must be a matching ")" somewhere in the command, usually at the end.
    I strongly recommend that you go to the Excel HELP file for more exhaustive information and examples.

  6. #6
    Hi guys First let me say that to my knoledge I have sent a rating of each
    thread and sent in a note closing the thread. If this is not the case then
    let me know where to go to close the threads.
    Thanks for your reply on the IF THEN COMMAND
    I will close this thread and give a rating.
    Max

  7. #7
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,060
    Location
    Tenspeed39355, above your initiial post you will see the Thread tools options, Click Thread Tools, select Mark Thread Solved, then click Perform Action.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  8. #8
    Good morning. There is one problem with going to the initiial post.
    I have no idea where they are. How about directing me to them so I can take
    care of closing the threads.
    Max

  9. #9
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,060
    Location
    Somehow I think you've found it..... right?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

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