From f654fc362e2ca75a1ff10b772f4b72065484fab2 Mon Sep 17 00:00:00 2001 From: Steve Fanning Date: Thu, 4 Feb 2021 15:07:17 +0100 Subject: [PATCH] Add Examples section to Help description for Calc's HLOOKUP function. File 04060109.xhp Change-Id: If5828bba9aec04564c9eab37f41731ac4d886c1a Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110364 Reviewed-by: Olivier Hallot Tested-by: Jenkins --- source/text/scalc/01/04060109.xhp | 92 +++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/source/text/scalc/01/04060109.xhp b/source/text/scalc/01/04060109.xhp index c695e91650..c571dc97ae 100644 --- a/source/text/scalc/01/04060109.xhp +++ b/source/text/scalc/01/04060109.xhp @@ -458,6 +458,98 @@ HLOOKUP(SearchCriterion; Array; Index [; SortedRangeLookup]) For an explanation on the parameters, see: VLOOKUP (columns and rows are exchanged) + + Suppose we have built a small database table occupying the cell range A1:DO4 and containing basic information about 118 chemical elements. The first column contains the row headings “Element”, “Symbol”, “Atomic Number”, and “Relative Atomic Mass”. Subsequent columns contain the relevant information for each of the elements, ordered left to right by atomic number. For example, cells B1:B4 contain “Hydrogen”, “H”, “1” and “1.008”, while cells DO1:DO4 contain “Oganesson”, “Og”, “118”, and “294”. + + + + A + + + B + + + C + + + ... + + + DO4 + + + + + Hydrogen + + + Helium + + + Lithium + + + ... + + + Oganesson + + + + + H + + + He + + + Li + + + ... + + + Og + + + + + 1 + + + 2 + + + 3 + + + ... + + + 118 + + + + + 1.008 + + + 4.0026 + + + 6.94 + + + ... + + + 294 + + +
+ =HLOOKUP("Lead"; $A$1:$DO$4; 2; 0) returns “Pb”, the symbol for lead. + =HLOOKUP("Gold"; $A$1:$DO$4; 3; 0) returns 79, the atomic number for gold. + =HLOOKUP("Carbon"; $A$1:$DO$4; 4; 0) returns 12.011, the relative atomic mass of carbon.
ROW function