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
| {{#expr: {{Get cell|B2|population-table}} / {{Get cell|B3|population-table}} }}
|-
| China
| 1,425,671,352
| 9,600,000
| {{#expr: {{Get cell|C2|population-table}} / {{Get cell|C3|population-table}} }}
|-
| United States
| 339,996,564
| 9,833,517
| {{#expr: {{Get cell|D2|population-table}} / {{Get cell|D3|population-table}} }}
|}
Will output the following table:
Country | Population | Area | Density |
---|---|---|---|
Argentina | 45,773,884 | 2,796,427 | 16.368703348952 |
China | 1,425,671,352 | 9,600,000 | 148.5074325 |
United States | 339,996,564 | 9,833,517 | 34.575275966879 |