if statement

From: alldreams (anonymous_at_discussions.microsoft.com)
Date: 06/15/04


Date: Tue, 15 Jun 2004 09:19:45 -0700

Could you help me get these conditions in VBA code?

':: first condition
IF A3 < A5 AND A4 > A5,
THEN A6 = A4 - A5 AND A7 = LONG.

IF A3 < A5 and A4 < A5
THEN A6 = A4 - A5 AND A7 = LOSS

IF A3 > A5 AND A4 < A5 THEN A7 = NOT LONG
 
':: second condition
IF A7 = null OR LOSS OR NOT LONG
THEN first condition for next column, B

IF A7 = LONG
THEN IF B4 > B5,
THEN B6 = B4-A5 AND A6 = 0 AND B7 = LONG.
IF B4 < B5 THEN B6 = B4-A5 AND A6 = 0 AND B7 = CLOSE
LONG.

':: This loops until the last nonblank value in row 1.



Relevant Pages

  • Re: Conditional Formatting With Grades
    ... Say your grades ... First Condition ... Second Condition ... Third Condition ...
    (microsoft.public.excel.worksheet.functions)
  • Re: using 2 If statements
    ... I am using Verilog-a.. ... They are evaluated in sequence. ... In fact if the first condition in the first if state is false, the second condition isn't evaluated either. ...
    (comp.lang.verilog)
  • CountIF formula
    ... I need to run a countif formula, with 2 conditions on two different ... columns, The first condition is that column D matches cell A1, ... the second condition is that column K is greater than 0. ...
    (microsoft.public.excel)
  • Re: conditions in Excel
    ... Assume the first condition is not met then you say you ... Frank Kabel ... Peter L wrote:> Hi Frank and thanks for your answer> If it not too mutch trubble I would like to have both a worksheet> formula or a VBA solution? ... > In your answer you wrote that:"your first and second condition are> identical but you want different ...
    (microsoft.public.excel.programming)
  • Re: Double check of variables.
    ... > In some examples of a PHP implementation I saw the following: ... the first condition. ... it does NOT check the second condition. ... alway be CERTAIN that your variable being tested actually exists before ...
    (comp.lang.php)