Difference between revisions of "Documentation/How Tos/Calc: COLUMN function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Automated text replacement %s)
m
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{DISPLAYTITLE:COLUMN function}}
 +
{{Documentation/CalcFunc SpreadsheetTOC
 +
|ShowPrevNext=block
 +
|PrevPage=Documentation/How_Tos/Calc:_AREAS_function
 +
|NextPage=Documentation/How_Tos/Calc:_COLUMNS_function
 +
}}__NOTOC__
  
 
== COLUMN  ==
 
== COLUMN  ==
Line 11: Line 16:
 
: If <tt>'''reference'''</tt> is omitted, the column number of the current cell (containing the formula) is returned.
 
: If <tt>'''reference'''</tt> is omitted, the column number of the current cell (containing the formula) is returned.
  
: If <tt>'''reference'''</tt> is a range of cells <u>and</u> the formula is entered as an array formula (by pressing '''Ctrl-Shift Enter''' rather than '''Enter''') a single row array of column numbers is returned.
+
: If <tt>'''reference'''</tt> is a range of cells <u>and</u> the formula is entered as an array formula (by pressing {{key|Ctrl|Shift|Enter}} rather than {{key|Enter}}) a single row array of column numbers is returned.
  
 
=== Example: ===
 
=== Example: ===
Line 26: Line 31:
 
: returns the single row array <tt>'''{4; 5; 6}'''</tt>, as this <u>is</u> an array formula. If this formula is entered in cell A1, A1 will display <tt>'''4'''</tt>, B1 <tt>'''5'''</tt> and C1 <tt>'''6'''</tt>.
 
: returns the single row array <tt>'''{4; 5; 6}'''</tt>, as this <u>is</u> an array formula. If this formula is entered in cell A1, A1 will display <tt>'''4'''</tt>, B1 <tt>'''5'''</tt> and C1 <tt>'''6'''</tt>.
  
{{Documentation/SeeAlso|
+
{{SeeAlso|EN|
 
* [[Documentation/How_Tos/Calc: ROW function|ROW]]
 
* [[Documentation/How_Tos/Calc: ROW function|ROW]]
 
* [[Documentation/How_Tos/Calc: SHEET function|SHEET]]
 
* [[Documentation/How_Tos/Calc: SHEET function|SHEET]]
Line 35: Line 40:
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
[[Category: Documentation/Reference/Calc]]
+
[[Category: Documentation/Reference/Calc/Spreadsheet functions]]

Latest revision as of 11:58, 2 February 2024



COLUMN

Returns the column number(s), given a reference.

Syntax:

COLUMN(reference)

returns the column number of reference, where reference is a reference to a cell.
If reference is omitted, the column number of the current cell (containing the formula) is returned.
If reference is a range of cells and the formula is entered as an array formula (by pressing  Ctrl  +  ⇧ Shift  +  ↵ Enter  rather than  ↵ Enter ) a single row array of column numbers is returned.

Example:

COLUMN(B3)

returns 2. Cell B3 is in the second column (column B).

COLUMN()

if entered in cell C7, returns 3. Cell C7 is in the third column.

COLUMN(D2:F3) (entered with the Enter key)

returns 4. This is not an array formula, so the column number of the first cell D2 is returned.

COLUMN(D2:F3) (entered with Ctrl-Shift-Enter)

returns the single row array {4; 5; 6}, as this is an array formula. If this formula is entered in cell A1, A1 will display 4, B1 5 and C1 6.



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_COLUMN_function&oldid=259988"
Views
Personal tools
Navigation
Tools