The spreadsheet for Ultimate Limit State Analysis of reinforced or prestressed concrete beams, previously presented here, has been combined with the Units4Excel spreadsheet to allow the program to work with any selected units, SI or non-SI. Provision for the American Concrete Institute code ACI318 has also been added. The revised spreadsheet, including full open source code, can be downloaded from ULS Design Functions.zip.
The screenshots below show the input for an analysis of a circular reinforced section in kip and inch units, to the ACI 318 code:

Input with kip and inch units to ACI 318

Concrete and reinforcement details in inch and kip units

Concrete section showing neutral axis position

Interaction Diagram in kip-inch units
Input and output for the same section in kN, mm and MPa units is shown below:

Input for mm, kN, Knm and MPa units

Extracts from the code to combine the unit conversion functions into the analysis code are shown below:
' Generate unit abbreviations for default units, or blanks to allow unspecified consistent units, or read units from spreadsheet
If IsNumeric(UnitsA(1, 1)) = True Then
If UnitsA(1, 1) = 0 Then
ForceUnitA(1, 2) = "kN"
StressUnitA(1, 2) = "MPa"
MomUnitA(1, 2) = "kN.m"
LunitA(1, 2) = "mm"
Else
ForceUnitA(1, 2) = ""
StressUnitA(1, 2) = ""
MomUnitA(1, 2) = ""
LunitA(1, 2) = ""
End If
Else
ForceUnitA(1, 2) = UnitsA(1, 1)
StressUnitA(1, 2) = UnitsA(2, 1)
MomUnitA(1, 2) = UnitsA(3, 1)
LunitA(1, 2) = UnitsA(4, 1)
End If
...
' Generate factors to convert input units to N, mm and MPa
If UnitsA(1, 1) <> 1 Then
If MomUnitA(1, 2) <> "N.mm" Then Momfact = ToSi2(MomUnitA, "N.mm")(1, 1) Else Momfact = 1
If ForceUnitA(1, 2) <> "N" Then ForceFact = ToSi2(ForceUnitA, "N")(1, 1) Else ForceFact = 1
If LunitA(1, 2) <> "mm" Then LFact = ToSi2(LunitA, "mm")(1, 1) Else LFact = 1
If StressUnitA(1, 2) <> "MPa" Then StressFact = ToSi2(StressUnitA, "MPa")(1, 1) Else StressFact = 1
' Apply factors to concrete and reinforcement data
For i = 1 To NumSects
For j = 1 To 5
Conc(i, j) = Conc(i, j) * LFact
Next j
Conc(i, 6) = Conc(i, 6) * StressFact
Conc(i, 7) = Conc(i, 7)
Next i
For i = 1 To NumReo
For j = 1 To 2
Reo(i, j) = Reo(i, j) * LFact
Next j
Reo(i, 4) = Reo(i, 4) * StressFact
Reo(i, 5) = Reo(i, 5) * ForceFact
Reo(i, 6) = Reo(i, 6) * LFact
Reo(i, 7) = Reo(i, 7) * StressFact
Next i
Else
Momfact = 1
ForceFact = 1
LFact = 1
StressFact = 1
End If
...
' Factor results to return to input units
Select Case Out_Index
Case 1
ReDim Umoma(1 To 3, 1 To 2)
Umoma(1, 1) = XA(7, 1) * Phiax / ForceFact
Umoma(2, 1) = XA(9, 1) * Phiax / ForceFact
Umoma(3, 1) = XA(11, 1) * Phiax / ForceFact
For i = 1 To 3
Umoma(i, 2) = ForceUnitA(1, 2)
Next i
Case 2
ReDim Umoma(1 To 3, 1 To 2)
Umoma(1, 1) = XA(8, 1) * Phi / Momfact
Umoma(2, 1) = XA(10, 1) * Phi / Momfact
Umoma(3, 1) = XA(12, 1) * Phi / Momfact
For i = 1 To 3
Umoma(i, 2) = MomUnitA(1, 2)
Next i
...