If you are simply trying to add A1
to A2
then =SUM(A1, A2)
would make a lot more sense.
If you are trying to make it so you want to add two cells together, but you want to dynamically reference the cells based on some other criteria (which is the only reason why you would want INDIRECT
) then you will need to do something like =INDIRECT("A1") + INDIRECT("A2")
or SUM(INDIRECT("A1"), INDIRECT("A2"))
. Although, written like that, it's really round-a-bout way of doing things.
Instead, if you set B1
to be "A1"
and B2
to be "A2"
then =SUM(INDIRECT(B1), INDIRECT(B2))
... then you can change the values of B1
and B2
to whatever cells you would like to add together.
Edited to add: The second optional parameter is only necessary if you are going to use R1C1
style of referencing a cell. When you concatenated A1
with "+" with A2
the result will be A1+A2
which is not a reference to anything. If you wish to use R1C1
style of referencing you can read more about how here
INDIRECT
takes only one parameter, and you used two parameters in your function, the first beingconcatenate(a1,"+",a2)
and the second0
.