function to count the number of cell references in a formula

C

Cecilia

One of the formulas is listed below. Is there a formula that would tell me
how many cells it's adding?

=SUM(S175:Z175)

In this instance it's expressed as a range and it's 8
 
B

Biff

Try this:

=COLUMNS(S175:Z175)

If the range of cells was S175:S185

=ROWS(S175:S185)

If the range of cells was C2:E10

=COLUMNS(C2:E10)*ROWS(C2:E10)

Biff
 
R

Ron Rosenfeld

Try this:

=COLUMNS(S175:Z175)

If the range of cells was S175:S185

=ROWS(S175:S185)

If the range of cells was C2:E10

=COLUMNS(C2:E10)*ROWS(C2:E10)

Biff


Or, more generally:

=SUMPRODUCT(COLUMNS(rng),ROWS(rng))


--ron
 

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