Template:Get cell/doc
Appearance
![]() | This is a documentation subpage for Template:Get cell. It may contain usage information, categories and other content that is not part of the original template page. |
![]() | This template uses Lua: |
This template serves to calculate a table cell out of the values of other cells.
Example
The following wikitext:
{| class="wikitable" id="population-table"
! Country
! Population
! Area
! Density
|-
| Argentina
| 45,773,884
| 2,796,427
| {{Calculated cell|B2/B3 round 0|population-table}}
|-
| China
| 1,425,671,352
| 9,600,000
| {{Calculated cell|C2/C3 round 0|population-table}}
|-
| United States
| 339,996,564
| 9,833,517
| {{Calculated cell|D2/D3 round 0|population-table}}
|}
Outputs the following table:
Country | Population | Area | Density |
---|---|---|---|
Argentina | 45,773,884 | 2,796,427 | Template:Calculated cell |
China | 1,425,671,352 | 9,600,000 | Template:Calculated cell |
United States | 339,996,564 | 9,833,517 | Template:Calculated cell |
Note that this template internally formats the values from B2 and B3 into plain numbers (without commas) to be able to do the division.