User:Timeshifter/Sandbox285

See:

Change rates per million to rates per 100,000. Or the reverse. Basically, you are dividing or multiplying all the numbers by 10. You can use free [https://www.microsoft.com/en-us/microsoft-365/excel Excel online], free [https://workspace.google.com/products/sheets Google Sheets] online, or freeware LibreOffice Calc.

class="wikitable sortable" style=text-align:right;

|+ Drug-induced mortality rates per million

!Location

!Year

!Females

!Males

!Total

{{flagg|uspeft|pref=Healthcare in|pref2=Health in|Austria}}

|2022

|18

|65

|42

{{flagg|uspeft|pref=Healthcare in|pref2=Health in|Belgium}}

|2020

|7

|34

|21

class="wikitable sortable" style=text-align:right;

|+ Drug-induced mortality rates per 100,000

!Location

!Year

!Females

!Males

!Total

{{flagg|uspeft|pref=Healthcare in|pref2=Health in|Austria}}

|2022

|1.8

|6.5

|4.2

{{flagg|uspeft|pref=Healthcare in|pref2=Health in|Belgium}}

|2020

|0.7

|3.4

|2.1

Note that for the visual editor to work correctly you will need to put nowiki tags ({{nowrap| }}) around the table templates (if any) just above the table. Remove them when you are done.

Then in the visual editor select and copy just the data cells, but not the years ({{Keypress|Ctrl|c}}). Then paste them ({{Keypress|Ctrl|v}}) into a blank sheet in one of the above spreadsheets. The range will be the same in all 3: A1:C2 for the above example. The basic formulas are: =A1:C2/10 and =A1:C2*10 (all numbers in the range are divided or multiplied by 10).

Click a blank column head to select that column. Then paste the formula in the fx spot above the spreadsheet. Then to get the adjusted data cells to show up:

  • In Excel just click enter.
  • In LibreOffice Calc click Ctrl + Shift + Enter.
  • In Google Sheets click Ctrl + Shift + Enter, and then Enter by itself.

Select and copy the adjusted data cells via {{Keypress|Ctrl|c}}. Then using the visual editor select the old numbers in the wikitable. Paste the new numbers over them via {{Keypress|Ctrl|v}}.

Change table from rates per million to rates per 100,000

Divide all data cells in a rates table by 10 in order to change to deaths per 100,000 instead of deaths per million.

Some background info if needed:

Via free Google Sheets

:See https://workspace.google.com/products/sheets

Copy the data cells: In source editor put nowiki tags around templates just above the wiki table. Then in visual editor select a corner data cell. Then shift-click on opposite corner of rectangle of data cells. Then copy from your browser edit menu (or use {{Keypress|Ctrl|C}}).

Paste the data cells into a blank Google sheet]. Use the edit menu from your browser or {{Keypress|Ctrl|V}}. Once pasted in you should see the range of cells already selected. If not, select one corner cell. Then shift-click the opposite corner. Just above the top cells to the left should be the range. For example: A1:C29.

Put that range in the formula like this:

:=ARRAYFORMULA(Sheet2!A1:C29/10)

The formula is dividing all cells in the range by 10. Check the sheet number in the sheet tabs just below the data.

Use the formula: Click on a blank column head to the right of the data. Paste the formula in the fx spot just above the data. Click enter on your keyboard. All the corrected data will show up.

Paste the adjusted data into the wikitable: Copy that data, and paste it over the old data in the wikitable via the visual editor.

For more info:

  • [https://support.google.com/docs/thread/229667532/to-divide-entire-range-of-cells-by-1000-each-cell?hl=en To divide entire range of cells by 1000 (each cell)]. Google Docs Editors Community.

Via freeware LibreOffice Calc

:See LibreOffice Calc.

Paste just the data cells into a blank sheet. Note the range in the spot to the left just above the data cells. Such as A1:C29

Put it in the Calc formula:

:=A1:C29/10

Click the top of any blank column. Paste the formula in the fx spot just above the data. Click Ctrl + Shift + Enter on your keyboard. All the corrected data will show up.

For more info:

  • [https://help.libreoffice.org/latest/en-US/text/scalc/01/04060107.html Array functions]. LibreOffice Help.

Via Excel online

:See: https://www.microsoft.com/en-us/microsoft-365/excel

Paste just the data cells into a blank workbook via the browser edit menu, or {{Keypress|Ctrl|v}}.

Then click the top of a blank column. Formula is same as in LibreOffice Calc:

:=A1:C29/10

Paste the formula in the fx spot just above the data via the browser edit menu or {{Keypress|Ctrl|v}}. Click enter, and the adjusted data shows up starting at the top data cell of the blank column you had selected.

Select the adjusted data. Then right-click it, and click copy. Or use {{Keypress|Ctrl|c}}. Paste it into the wiki table via the visual editor.