Excel Formula in Infopath - InfoPath Dev
in

InfoPath Dev

Excel Formula in Infopath

Last post 11-09-2010 10:33 AM by ctoper11. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 11-08-2010 02:24 PM

    Excel Formula in Infopath

    Ok this seems really simple but I'm terrible with formulas. I'm creating a form and I need one column (last year Annual Salary) and another column (this year Annual Salary) to spit out the percentage increase in salary into a third column (Percentage) I know in Excel the forumla would be =(B2-A2)/A2 but how do I work this in Infopath? A total newb question I know. Thank you!

  • 11-09-2010 01:12 AM In reply to

    Re: Excel Formula in Infopath

    You can use a formula like (ThisYearSalary - LastYearSalary) div LastYearSalary as the default value formula for the Percentage field.  You can use the Insert Field... button to help you with selecting the right fields.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-09-2010 09:45 AM In reply to

    Re: Excel Formula in Infopath

    Success! Yes that totally worked thank you Jimmy. So only one more question the numbers are coming out with a 0. before them (ie 50% is coming out 0.5) I can't see anyway to format that control to a percentage. Is there a formula to do so? Thank you again for all of your help.

  • 11-09-2010 10:03 AM In reply to

    Re: Excel Formula in Infopath

    If you're using an Expression Box, you can select Decimal in the Format As option, and then click Format, you can select percentage.  This will basically just show the number multiplied by 100 with all of the remaining digits as a fractional part.

    You can instead use a formula like

    concat(floor(my:Percentage * 100), " %") 

    to show only the whole number part of the percentage and a % symbol.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-09-2010 10:29 AM In reply to

    Re: Excel Formula in Infopath

    That formula you entered would it be before or after my formula to figure out the percent (FromSalary - ToSalary) / FromSalary

  • 11-09-2010 10:33 AM In reply to

    Re: Excel Formula in Infopath

    Never mind I totally got it. Thank you again Jimmy you're a genius.

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.