Variables in a IF THEN ELSE?

# Thread: Variables in a IF THEN ELSE?

1. Senior Member
Join Date
Dec 1969
Posts
1,671

## Variables in a IF THEN ELSE?

How can insert two variables in IF...THEN...ELSE<BR>to compere them?<BR><BR>IF a(sum,1)=???? And a(sum,0)=????? Then<BR> rowcolor="#BBFFD3"<BR> End If<BR><BR>If i put in plain text it works just fine.<BR><BR>IF a(sum,1)="25" And a(sum,0)="April" Then<BR> rowcolor="#BBFFD3"<BR> End If

2. asphack Guest

## RE: Variables in a IF THEN ELSE?

Dim var1<BR>Dim var2<BR><BR>var1=(Use quotes for literal values, else use a function to determine var1)<BR>var2=(same thing for var2)<BR><BR>If a(sum,1)=var1 and a(sum,0)=var2 Then<BR>....<BR>End if<BR><BR>Is that what you were looking for? Hope so...

3. Senior Member
Join Date
Dec 1969
Posts
1,671

## RE: Variables in a IF THEN ELSE?

I&#039v tried that.<BR><BR>Dim day, month, actual<BR><BR>day=Day(Now)<BR>actual=Month(Now)<BR >month=MonthName(actual)<BR><BR>IF a(sum,1)=day And a(sum,0)=month Then<BR> rowcolor="#BBFFD3"<BR> End If<BR><BR>But I don&#039t get any result.<BR>If I write out the variables, I get the values.<BR>&#060;%=day%&#062; = today - 27<BR>&#060;%=month%&#062; 0 this month - April<BR><BR>Any sugestions??

4. Franco Guest

## RE: Variables in a IF THEN ELSE?

Dude<BR><BR>Try &#060;%=a(sum,1)%&#062; and see if you get anything other than a puzzled expression.<BR><BR>What does the "a" function do?<BR><BR>Franco

5. Senior Member
Join Date
Dec 1969
Posts
1,671