Refer to the row that contains the formula in MS Word table - ms-word

I'm trying to create relative references in a Word table, so that the formula for each row reads from the data in a defined column in that row.
Using help pages here as reference
https://support.microsoft.com/en-us/office/use-a-formula-in-a-word-or-outlook-table-cbd0596e-ea8a-485e-a35d-b2cb2c4f3e27#:~:text=it%20is%20ignored.-,RnCn%20references,row%20and%20the%20second%20column.
It says to refer to the row that contains the formula use R... but I don't see examples of that particular reference in the help page - only RnCn style references.
I would like a simple formula in column C to reference the columns in the row in which the formula appears.
Column A
Column B
Column C
10
53
column a - column b
23
67
column a - column b
I would like to know how to use the "R" reference - as suggested is possible in the help pages - , as opposed to the Rn or RnCn styles. Please could you share an example as I have tried a number of iterations e.g. =RC2, =R(C2) etc and keep getting formatting errors.
My interpretation from the help pages is that RnCn would be absolute references, and that R "the row that contains the formula" is for relative references.

You have to put {=a1-b1} (using Ctrl + F9 to insert the curly brackets)
But there is nothing like an Excel-drag-down - you have to write each formula.
Plus: if you insert a row, formulas won't get adjusted!!

Related

Copying contents of columns with Field calculator in Qgis

I have to split the content of a column into 2 differents columns using the QGIS Field Calculator. Basically, my table is something like that:
Basically I have to work with descriptio column omitting characters from 1-12 and then copy next 8 characters (in this case "AgilisSi") into the PresLACAGI column.
The other element to copy is the final number in descriptio column, ranging from 1 to 3 characters. Possibly the best is thing would be a syntax that reproduces in CodiClapa column the number after ": ", including the space in the syntax.
Thanks a lot!
Use the field calculator, check Update existing field and select column from drop down and type in the Expression window for:
PresLACAGI: substr(descriptio,12,8)
CodiClapa: right(descriptio,3)

Adding the totals of two seperate tables in a word document

this question relates to adding the totals of two tables and using that total in the body of the word document.
In my case I have a word document (docx) with two tables. These tables are populated through a word merge process of third party software over which I have no control. For ease of reference I will refer to each table as table1 and table2. Both tables will contain an unknown amount of rows, but the last row, will always contain a total in the last column, which will total the rows above using the formula =SUM(ABOVE).
In the body of the document, I know need to reference the total of each table and because I do not know how many rows there are, I am at a loss. For example, if I knew how many rows there are, I could use the answer given here.
I have tried to using a merge field - with the column names as follows - however I get a !Syntax error ...
=SUM(table1[Amount]+table2[InterestAmount])
Any and all help greatly appreciated.
If you bookmark the two tables (e.g. TblA, TblB), you can use a formula field to tally their totals:
{=SUM(TblA C:C)/2+SUM(TblB C:C)/2}
The reason for the /2 is that, unless you know the last row # beforehand, you need to reference the entire column (including your existing totals row), the sum of which will therefore be twice the total.
To see how to do a wide range of calculations in Word, check out my Microsoft Word Field Maths Tutorial, at:
http://www.msofficeforums.com/word/38720-microsoft-word-field-maths-tutorial.html
or:
http://www.gmayor.com/downloads.htm#Third_party
Fields can be bookmarked in Word, then referenced elsewhere in the document. When bookmarking in a table, be careful to not select the entire cell, only the field! If the entire cell is bookmarked then the cell structures are carried across to the REF and the field content can't be processed numerically.
For three bookmarked fields with the names Fld1, Fld2and Fld3 that should be multiplied the combined field code would look like this:
{ = { REF Fld1 } * { REF Fld2 } * { REF Fld3 } \# "0.00" }
Note that you could also use the PRODUCT function (like SUM, but multiplies, each factor separated using the system's list separator character.)
Notes for readers not familiar with working with Word field codes: the paired wavy braces must be inserted using Ctrl+F9 and cannot simply be typed from the keyboard. Alt+F9 will toggle between field code and field result display. Press F9 to force a field to update.

COUNTIF based on three conditions using OFFSET and MATCH

Please see example screengrab
I would like to populate cell M2. Firstly to match K2 (Taylor) against column headers C1:I1 looking at the results in the column C2:C32. I would like to find the amount of times "a" appears in C2:C32 where Type (Column B) = "r".
So the result would be 3 (Reynolds, Maggio & Hamilton).
As you can see I've managed to populate Column R with totals without comparing against Type (Column B) but am having great difficulty understanding how to extend the comparison, intentionally without the use of helper columns/rows.
Any help would be greatly appreciated.
Since you have to depend on 2 columns, you will have to use COUNTIFS. Without being dynamic, the formula for M2 would be:
=COUNTIFS($B$2:$B$32,"r",$C$2:$C$32,"a")
^------------^ ^------------^
1st Condition 2nd Condition
To make it dynamic, only the second column needs to be changed:
=COUNTIFS($B$2:$B$32,"r",OFFSET($B$2:$B$32,0,MATCH($K2,$C$1:$I$1,0)),"a")
Your total's formula could be simplified to this also (keep the range as it is instead of manually putting it as 32 rows high for instance):
=COUNTA(OFFSET($B$2:$B$32,0,MATCH($K2,$C$1:$I$1,0)))

Excel 2013 - Sumifs - Add all cells in a column

I have the following formula in my Excel 2013 spreadsheet:
=SUMIFS(Employees!$T$2:$T$1114, Employees!$L$2:$L$1114, $A5, Employees!$J$2:$J$1114, 1, Employees!$Q$2:$Q$1114, "N", Employees!$K$2:$K$1114, C$3)
It is summing column T based on certain criteria. Looking at Employees!$T$2:$T$1114 as an example, I have a header row, so I start at T2. I then select all the cells in that column. which currently ends at 1114. The problem is, that number can change.
If I want to remove the hard-coding and just select all the cells that contain data in that column, then sum that data based on this criteria, how would I change this?
If the header above T isn't sumable, and/or the header above L isn't a valid criteria, then it won't matter if they are included in the sum_range and criteria_range, respectively. In that case, you can specify entire columns, like Employees!$T:$T, and not worry about where the data starts or ends.
=SUMIFS($A:$A, $B:$B, G2)
If there is data above the desired part of T, you could add another criteria to avoid it, for instance, by using an additional (hidden) column with markers.

Libreoffice Calc reference cell with a specific progression

I have a collumn with this contend inside:
=sheet1.F8
=sheet1.F15
=sheet1.F22
Normally in the excel I select the three cells and pull down, excel understand the logic and the next cell above will be "sheet1.F29". But if I do this in Libreoffice it puts "sheet1.F11".
Do you have any idea of how to do this ? (I have several sheets like this logic and I'd like to use Libreoffice instead Excel).
I found a workaround and replying here:
It is setting the reference to “F11” because the first row contains a reference to F8 and the new entry is 3 rows beneath this i.e., the offset is based on the first cell of the selection, thus 8+3=11. A workaround is to use the addresses of the destination and combine this with the INDIRECT() function. For example, create a separate column with “Sheet1.F8”, “Sheet1.F15”, and Sheet1.F22” etc. Highlight and drag this column of values to obtain a column of correct address references. Then adjacent to this use (given “Sheet1.F8” in sheet 2 cell A1) =INDIRECT(A1) in B1. Now drag this down the B column to obtain the required values.