Jump to content

Template:Get cell/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
mNo edit summary
Line 34: Line 34:
| 45,773,884
| 45,773,884
| 2,796,427
| 2,796,427
| {{Calculated cell|B2/B3 round 0|population-table}}
| {{Calculated cell|B2/B3 round 0|population-table}}
|}
|}



Revision as of 19:36, 29 April 2024

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}}
|}

Outputs the following table:

Country Population Area Density
Argentina 45,773,884 2,796,427 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.