Skip to main content
Question

If AND Formula help

  • July 23, 2019
  • 0 replies
  • 93 views

Need help with this If and formula. The error is stating that there aren't enough arguments to support the function. 


IF(AND([FOX NTV]>[Client NTV],(((([FOX NTV]-[Client NTV])/30)*[Base Rent] )>[Vacancy]),
OR(ISPICKVAL([RQ Lease Terms],"Month to Month"), ISPICKVAL([RQ Lease Terms],"Subject to Extension"))),

(((([FOX NTV]-[Client NTV])/30)[Base Rent])-[Vacancy]+((([Client Lease Start Date]-[FOX Lease 1 Start Date])/30)[Base Rent])),

IF(AND([FOX NTV]>[Client NTV],[FOX NTV]>[Client LOS],(((([FOX NTV]-[Client LOS])/30)*[Base Rent])>[Vacancy]),OR(ISPICKVAL([RQ Lease Terms],"Length of Stay"),ISPICKVAL([RQ Lease Terms],"Firm Departure Date"))),

(((([FOX NTV]-[Client LOS])/30)*[Base Rent])-[Vacancy]),


NULL))
This topic has been closed for replies.

  • Quickbase Alumni
  • July 24, 2019
The core of what you need is simple. You need the comparison(1 = 1), a true and a false.

If(
1 = 1, True,
False
)

If you have multiple lines they still need the same format. The "1 = 5, True," is the first part and the false is the next line saying 1=4 which it will see is not a False and actually another thing to compare. So it moves down the if statement in that way. I wish I could make a nice gif for this. 

If(
1 = 5, True,
1 = 4, True,
1 = 3, True,
1 = 2, True,
False
)

Looking at your formula.. I think there are many issues with this. It is so hard to tell because it is spaghettied so hard.

For example look at the second group of text. It begins with a part that makes no sense. "((([FOX NTV]-[Client NTV])/30)[Base Rent])" that is clearly missing something. Walk through it, you are subtracting [FOX NTV] from [Client NTV] then dividing that by 30 and then randomly throwing another field next to it with no operator. It is also in the second half of that line. From the other lines it looks like it is missing an asterisk.

I'm not sure what the point of doing "If(AND" is either, I don't think it is doing anything when you put an and right at the beginning like that. 

  • Author
  • Quickbase Alumni
  • July 24, 2019
Hey! It was previously coded like that outside of quickbase minus the asterisk missing in the one line. 

If I do your format and get rid of the (AND, I run into more errors with the entire formula. 


AdamKeever1
Forum|alt.badge.img+2
  • Quickbase Alumni
  • July 24, 2019
In quick base, put the and in between each condition you would like to combine for evaluation; i.e. If( condition1 and condition2, result