joshbtn / excelFormulaUtilitiesJS

Based on ewbi's go calc excel formula parser http://ewbi.blogs.com/develops/popular/excelformulaparsing.html. This library contains methods to beautify an excel formula. This library also contains functions to convert an excel formula to JavaScript (ECMAScript) or C# and python.
http://excelformulabeautifier.com/
Other
394 stars 101 forks source link

ROUND intendation is of with negative numbers. #59

Open kitsunde opened 7 years ago

kitsunde commented 7 years ago
=IF(A149="","",MAX(IF(Input!$E$11+BI!AB149>Input!$K$3,0,OFFSET(Proj!$M$1,BI!AB149*12,0))+IF(Input!$E$11+BI!AB149>Input!$J$74,0,Input!$I$74)+IF(AB149>Input!$K$76,0,ROUND((1-(1+Input!RT_INT)^-(Input!RT_term-AB149+1))/(1-(1+Input!RT_INT)^-Input!RT_term),4)*Input!SA_RT),ROUND(OFFSET(Proj!$CH$1,BI!AB149*12,0),-2)+IF(Input!$E$11+BI!AB149>Input!$J$74,0,Input!$I$74)+IF(AB149>Input!$K$76,0,ROUND((1-(1+Input!RT_INT)^-(Input!RT_term-AB149+1))/(1-(1+Input!RT_INT)^-Input!RT_term),4)*Input!SA_RT)))

It does't indent the -2 in ROUND properly unless it's a positive number.

screenshot 2017-05-09 12 05 10
joshbtn commented 7 years ago

@kitsunde , Thanks for the feedback! Looks like negative numbers don't get handled correctly in general. I'll take a look as soon as time allows.