I built a rebar lookup using PyXLL.
However, consider why I might prefer using PyXLL:
- it allows the function to reside in a central location outside of the Excel spreadsheet
- avoids XLAM files
- avoids broken Excel links
- clean — no clumsy Excel data sections/tabs
- it is easily programmed and maintained using Python
- it is easily customized
- multiple versions of the function can be produced as needed (to address building code changes, for instance)
Screenshot of lookup used in Excel
Screenshot of lookup formulas used in Excel
Python/PyXLL function
ACI reinforcing bar (rebar) in the USA is provided in 11 nominal sizes (callouts):
- #3
- #4
- #5
- #6
- #7
- #8
- #9
- #10
- #11
- #14 and
- #18.
Features
In my function, the user may enter string or numeric callouts. Numeric callouts may be integer or float. Float entries are rounded down to the nearest integer.
I also allow abbreviated designation of properties: for example, the user may enter “D” or “DI” or “DIA” or “DIAM” for “DIAMETER”. Lowercase entries are automatically converted to uppercase.