RE: What are {}, how do you use them in IF statements
- From: Joel <Joel@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 27 Sep 2007 03:38:03 -0700
Curly bracket are used in some function like INDEX (see VBA help below) that
have two forms of the function - Array and Reference. I put the function into
=INDEX({1,2;3,4},0,2 into my excel 2003 and the brackets stayed.
INDEX
See Also
Returns the value of an element in a table or an array, selected by the row
and column number indexes.
The INDEX function has two syntax forms: array and reference. The array form
always returns a value or array of values; the reference form always returns
a reference. Use the array form if the first argument to INDEX is an array
constant.
Syntax 1
Array form
INDEX(array,row_num,column_num)
Array is a range of cells or an array constant.
If array contains only one row or column, the corresponding row_num or
column_num argument is optional.
If array has more than one row and more than one column, and only row_num or
column_num is used, INDEX returns an array of the entire row or column in
array.
Row_num selects the row in array from which to return a value. If row_num
is omitted, column_num is required.
Column_num selects the column in array from which to return a value. If
column_num is omitted, row_num is required.
Remarks
If both the row_num and column_num arguments are used, INDEX returns the
value in the cell at the intersection of row_num and column_num.
If you set row_num or column_num to 0 (zero), INDEX returns the array of
values for the entire column or row, respectively. To use values returned as
an array, enter the INDEX function as an array formula in a horizontal range
of cells for a row, and in a vertical range of cells for a column. To enter
an array formula, press CTRL+SHIFT+ENTER.
Row_num and column_num must point to a cell within array; otherwise, INDEX
returns the #REF! error value.
Example 1
The example may be easier to understand if you copy it to a blank work***.
How?
Create a blank workbook or work***.
Select the example in the Help topic. Do not select the row or column
headers.
Selecting an example from Help
Press CTRL+C.
In the work***, select cell A1, and press CTRL+V.
To switch between viewing the results and viewing the formulas that return
the results, press CTRL+` (grave accent), or on the Tools menu, point to
Formula Auditing, and then click Formula Auditing Mode.
1
2
3
A B
Data Data
Apples Lemons
Bananas Pears
Formula Description (Result)
=INDEX(A2:B3,2,2) Value at the intersection of the second row and second
column in the range (Pears)
=INDEX(A2:B3,2,1) Value at the intersection of the second row and first
column in the range (Bananas)
Example 2
The example may be easier to understand if you copy it to a blank work***.
How?
Create a blank workbook or work***.
Select the example in the Help topic. Do not select the row or column
headers.
Selecting an example from Help
Press CTRL+C.
In the work***, select cell A1, and press CTRL+V.
To switch between viewing the results and viewing the formulas that return
the results, press CTRL+` (grave accent), or on the Tools menu, point to
Formula Auditing, and then click Formula Auditing Mode.
1
2
3
A B
Formula Description (Result)
=INDEX({1,2;3,4},0,2) Value in the first row, second column in the array
constant (2)
Value in the second row, second column in the array constant (4)
Note The formula in the example must be entered as an array formula. After
copying the example to a blank work***, select the range A2:A3 starting
with the formula cell. Press F2, and then press CTRL+SHIFT+ENTER. If the
formula is not entered as an array formula, the single result is 2.
"Paul" wrote:
I'm new to this process and I have previous typed the same question but.
haven't seen my question on the internet, so here goes again, probably my
fault.
I am using another person's formula. They have used the following brackets {
}.
Q -
What do they mean.
When I try to amend the formula they disappear {} and the formula stops
working.
How do I activate them and amend them
Why are they different to ().
Thank you in advance dor your help.
Regards
Paul
- Follow-Ups:
- Prev by Date: RE: Moving up one cell
- Next by Date: Re: Copy, Paste Special Values all sheets in workbook
- Previous by thread: RE: Moving up one cell
- Next by thread: RE: What are {}, how do you use them in IF statements
- Index(es):