folu
folu

Reputation: 1

Concatenating a string to execute then running it from another cell

I am trying to execute a concatenated string. I am using the following statement to concatenate the strings to be executed:

=(CONCATENATE("=SUM(","'Analytics 2017'!",K4,":",L4, ")"))

this works and the cell(c4) holds the concatenated string but when I use

=INDIRECT("C4") 

as an "execute" formula I get an error.

Upvotes: 0

Views: 111

Answers (1)

IR_IR
IR_IR

Reputation: 184

You need to do next:

From

=(CONCATENATE("=SUM(","'Analytics 2017'!",K4,":",L4, ")"))

you need to change to this

=(CONCATENATE("'Analytics 2017'!",K4,":",L4))

and then from this

=INDIRECT("C4") 

you change to this

=SUM(INDIRECT("C4"))

Upvotes: 1

Related Questions