I have an excel formulea "=if(and(..." what is it in Access?

  • Thread starter Thread starter Guest
  • Start date Start date
Have no idea what you are asking. Post your full question using the text
area and we can help you translate your formula. Either post the full
formula or state what you want to accomplish in words. Are you trying to
display text in a text field based on an IF? Are you trying to limit
records pulled to the report?
 
Please feel free to use the body of a message to accurately describe your
question.
 
Hi
I have an access report showing sales for 2004 and 2005 and I am trying to
show a field that displays the % increase/decrease in sales. However as some
figues are 0 I get the #div/0! error. In excel I can create a furmulea
=if(and(a1=0,b1=0),0%,if(and(a1=0,b1>0),100%,((b1/a1)*1)-1) that gives me
numbers for all possible values but when i try use this in access it does not
work. For a1 and b1 substitue for 2004 sales & 2005 Sales.
I hope I have explained this better.
 
=IIF((a1=0) and (b1=0),0,IIF((a1=0) and (b1>0),1,((b1/a1)*1)-1)
and format your textbox to show as percent
 
Back
Top