Zoltan Hernyak
Zoltan Hernyak

Reputation: 1239

Excel use range name as an argument to excel function

Excel example

Let suppose I have several named ranges, P2017.01, P2017.02 and so on. These ranges hold values from year 2017 month 01, month 02, and so on. I want to sum the month values one-by-one. I want to construct the names of the ranges, and use these constructed names as a function argument. Example: the prefix 'P2017' is in B3, the index of the month is in C3. I concatenate B3&'.'&C3 and store the value to D3.

In E3 I want to =SUM(INDEX(P2017.01;0;2)), but instead of writing the name P2017.01 I want to acquire the name from the value of cell D3.

What should I write to E3 to do that?

Upvotes: 1

Views: 180

Answers (1)

Harun24hr
Harun24hr

Reputation: 36860

Try following formula...

=SUM(INDEX(INDIRECT(D3),0,2))

Comma (,) or semicolon (;) depens on regional settings.

Upvotes: 1

Related Questions