Template:Get cell/doc: Difference between revisions
Appearance
Content deleted Content added
Sophivorus (talk | contribs) No edit summary Tag: Reverted |
Sophivorus (talk | contribs) No edit summary |
||
Line 54: | Line 54: | ||
| 339,996,564 |
| 339,996,564 |
||
| 9,833,517 |
| 9,833,517 |
||
| {{Get cell| |
| {{Get cell||population-table|Template:Get cell/doc}} |
||
|} |
|} |
Revision as of 12:47, 30 April 2024
![]() | 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}} round 0 }}
|-
| China
| 1,425,671,352
| 9,600,000
| {{#expr: {{Get cell|C2|population-table}} / {{Get cell|C3|population-table}} round 0 }}
|-
| United States
| 339,996,564
| 9,833,517
| {{#expr: {{Get cell|D2|population-table}} / {{Get cell|D3|population-table}} round 0 }}
|}
Will output the following table:
Country | Population | Area | Density |
---|---|---|---|
Argentina | 45,773,884 | 2,796,427 | 16 |
China | 1,425,671,352 | 9,600,000 | 149 |
United States | 339,996,564 | 9,833,517 | 35 |