using indirect to sum range

E

Edward

I have a sheet that references data in another sheet within a workbook
in its same corresponding row. For example, for an item in Sheet1 in
row 6 the formula might be:

=Sheet2!F6+Sheet2!G6

Due to the way that the data is loaded (this is part of a complicated
process that I cannot change and I only am able to make updates to my
own sheet) I cannot just define the cell in row 6 to be =Sheet2!
F6+Sheet2!G6 but I can get my desired result by using:

=Indirect("Sheet2!F"&row())+Indirect("Sheet2!G"&row())

However, I cannot figure out how to do this when my formula should be
something like:

=Sum(Sheet2!B6:E6)

Any ideas?
 
P

Pete_UK

Have you tried:

=SUM(INDIRECT("Sheet2!B"&row()&":E"&row()))

?

Hope this helps.

Pete
 
P

Pete_UK

You're welcome, Edward - thanks for feeding back.

I wasn't sure I understood what the problem was.

Pete
 
F

Franz Verga

Nel post:[email protected],
Edward said:
I have a sheet that references data in another sheet within a workbook
in its same corresponding row. For example, for an item in Sheet1 in
row 6 the formula might be:

=Sheet2!F6+Sheet2!G6

Due to the way that the data is loaded (this is part of a complicated
process that I cannot change and I only am able to make updates to my
own sheet) I cannot just define the cell in row 6 to be =Sheet2!
F6+Sheet2!G6 but I can get my desired result by using:

=Indirect("Sheet2!F"&row())+Indirect("Sheet2!G"&row())

However, I cannot figure out how to do this when my formula should be
something like:

=Sum(Sheet2!B6:E6)

Any ideas?

Hi Edward,

Should be something like this:

=Sum(Indirect("Sheet2!B"&row()&":E"&row()))

(written directly here, so some test is needed...)


--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.


Thanks in advance for your feedback.


Ciao


Franz Verga from Italy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top