Can Excel do this with functions?

  • Thread starter Thread starter kaufmto
  • Start date Start date
K

kaufmto

I have been teaching myself Excel and have come across a possibl
limitation on the program that nobody seems to be able to help me with
Is it possible to replace a number within a function within one cel
with a reference to another cell? Here is the easiest example I ca
think of.

Instead of SUM(A1:A6), I want the "6" in A6 replaced with a number tha
is taken from another cell. Assume that the number I want is in cel
B1. I would think you could just enter SUM(A1:A[B1]), but that return
an error. Is this beyond the ability of Excel or is there som
function I can use?

Any insights would be GREATLY appreciated.

Thanks!

- - To
 
Hi kaufmto!

Use the INDIRECT function:

=SUM(INDIRECT("A1:A"&B1))


--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Hi Tom!

Always pleased to help. Come back soon.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Just another option if you don't like strings...

=SUM(OFFSET(A1,,,B1))
 

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

Back
Top