Recreate Excel formula to locate smallest number in a table | Community
Skip to main content
ReluctantProgrammer
Level 4
July 1, 2021
Solved

Recreate Excel formula to locate smallest number in a table

  • July 1, 2021
  • 2 replies
  • 878 views

Looking for code to re-create this Excel formula which identifies the lowest number in a table column and places it in a different field.  

 

="Single Unit:" &CHAR(10)& IF(COUNT(AB17:AB23)>0,TEXT(ROUNDDOWN(MIN(AB17:AB23),0),"0") & " tons",IF(COUNT(AB24:AB27)>0,TEXT(ROUNDDOWN(MAX(Z17:Z23),0),"0") & " tons",IF(AND(ISNUMBER(G28),ISNUMBER(G29),ISNUMBER(G30),ISNUMBER(G31),MIN(G28:G31)<1),"LL","n/a")))

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kosta_Prokopiu1

If you make your table in a fitting way then it should be very easy:

Check https://help.adobe.com/en_US/livecycle/10.0/DesignerFormCalcRef/WS92d06802c76abadb-32254d55129f5ee7c98-7fe3.html for the min() function of FormCalc

And here the result:

 

2 replies

Kosta_Prokopiu1
Adobe Employee
Kosta_Prokopiu1Adobe EmployeeAccepted solution
Adobe Employee
July 1, 2021

If you make your table in a fitting way then it should be very easy:

Check https://help.adobe.com/en_US/livecycle/10.0/DesignerFormCalcRef/WS92d06802c76abadb-32254d55129f5ee7c98-7fe3.html for the min() function of FormCalc

And here the result:

 

ReluctantProgrammer
Level 4
July 8, 2021
That's what I needed. Thanks!!
Mayank_Gandhi
Adobe Employee
Adobe Employee
July 5, 2021

@reluctantprogrammer You can use the javascript function to find a min or max amongst the array of objects. Rather than converting excel formula try to load the same computation via a javascript function. 

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max