Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default How do I put a variable column number in the sum() function?

I want to sum cells based on a number contained in cell A1
For example:
I currently have the formula =SUM(F7:I7) which sums 4 of the cells in
row 7 (form F to I).
I would like to be able to have the number of cells in row 7 determined
by a value in a specific cell such as cell A1 (in this example would
have contained the number 4).

I do not seem to be able to functions of any kind in the range sum
expression?



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default How do I put a variable column number in the sum() function?

Hi,

The following formula should do the trick

=SUM(OFFSET(F7,,,,A1))

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"BobC" wrote:

I want to sum cells based on a number contained in cell A1
For example:
I currently have the formula =SUM(F7:I7) which sums 4 of the cells in
row 7 (form F to I).
I would like to be able to have the number of cells in row 7 determined
by a value in a specific cell such as cell A1 (in this example would
have contained the number 4).

I do not seem to be able to functions of any kind in the range sum
expression?




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default How do I put a variable column number in the sum() function?

I also had trouble finding the button ... so I will type it ...
*YES*
Thanks!
Bob

Shane Devenshire wrote:
Hi,

The following formula should do the trick

=SUM(OFFSET(F7,,,,A1))

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"BobC" wrote:

I want to sum cells based on a number contained in cell A1
For example:
I currently have the formula =SUM(F7:I7) which sums 4 of the cells in
row 7 (form F to I).
I would like to be able to have the number of cells in row 7 determined
by a value in a specific cell such as cell A1 (in this example would
have contained the number 4).

I do not seem to be able to functions of any kind in the range sum
expression?




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How do I put a variable column number in the sum() function?

Here's a non-volatile method:

=SUM(F7:INDEX(F7:IV7,A1))

If A1 is empty the formula will calculate the entire range.

--
Biff
Microsoft Excel MVP


"BobC" wrote in message
...
I want to sum cells based on a number contained in cell A1
For example:
I currently have the formula =SUM(F7:I7) which sums 4 of the cells in row
7 (form F to I).
I would like to be able to have the number of cells in row 7 determined by
a value in a specific cell such as cell A1 (in this example would have
contained the number 4).

I do not seem to be able to functions of any kind in the range sum
expression?





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default How do I put a variable column number in the sum() function?

Hi,

The button is over on the right and has the comment Was this post helpful to
you?

But you wouldn't be the first person to miss it, and it may not even display
that way in some browsers.

Cheers,
Shane

"BobC" wrote:

I also had trouble finding the button ... so I will type it ...
*YES*
Thanks!
Bob

Shane Devenshire wrote:
Hi,

The following formula should do the trick

=SUM(OFFSET(F7,,,,A1))

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"BobC" wrote:

I want to sum cells based on a number contained in cell A1
For example:
I currently have the formula =SUM(F7:I7) which sums 4 of the cells in
row 7 (form F to I).
I would like to be able to have the number of cells in row 7 determined
by a value in a specific cell such as cell A1 (in this example would
have contained the number 4).

I do not seem to be able to functions of any kind in the range sum
expression?







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default How do I put a variable column number in the sum() function?

Bob is probably not using Microsoft's web interface to the newsgroup, so if
he is accessing the newsgroup directly (as many of us do) he wouldn't see
the button.
--
David Biddulph

"Shane Devenshire" wrote in
message ...
Hi,

The button is over on the right and has the comment Was this post helpful
to
you?

But you wouldn't be the first person to miss it, and it may not even
display
that way in some browsers.

Cheers,
Shane

"BobC" wrote:

I also had trouble finding the button ... so I will type it ...
*YES*
Thanks!
Bob

Shane Devenshire wrote:
Hi,

The following formula should do the trick

=SUM(OFFSET(F7,,,,A1))

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"BobC" wrote:

I want to sum cells based on a number contained in cell A1
For example:
I currently have the formula =SUM(F7:I7) which sums 4 of the cells in
row 7 (form F to I).
I would like to be able to have the number of cells in row 7
determined
by a value in a specific cell such as cell A1 (in this example would
have contained the number 4).

I do not seem to be able to functions of any kind in the range sum
expression?







  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How do I put a variable column number in the sum() function?

Bob is using Mozilla


Gord

On Sun, 23 Nov 2008 09:37:54 -0000, "David Biddulph" <groups [at]
biddulph.org.uk wrote:

Bob is probably not using Microsoft's web interface to the newsgroup, so if
he is accessing the newsgroup directly (as many of us do) he wouldn't see
the button.


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default How do I put a variable column number in the sum() function?

Thanks!!!
I appreciate the help!
Everything that I was trying seemed to yield syntax errors!

Bob

T. Valko wrote:
Here's a non-volatile method:

=SUM(F7:INDEX(F7:IV7,A1))

If A1 is empty the formula will calculate the entire range.

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default How do I put a variable column number in the sum() function?

Shane,

No buttons shows.
I thought you were just being funny.
I'm using Mozilla (SeaMonkey).
You'll have to press the button in my behalf.
Thanks again! ... it worked!

Bob

Shane Devenshire wrote:
Hi,

The button is over on the right and has the comment Was this post helpful to
you?

But you wouldn't be the first person to miss it, and it may not even display
that way in some browsers.

Cheers,
Shane

"BobC" wrote:

I also had trouble finding the button ... so I will type it ...
*YES*
Thanks!
Bob

Shane Devenshire wrote:
Hi,

The following formula should do the trick

=SUM(OFFSET(F7,,,,A1))

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"BobC" wrote:

I want to sum cells based on a number contained in cell A1
For example:
I currently have the formula =SUM(F7:I7) which sums 4 of the cells in
row 7 (form F to I).
I would like to be able to have the number of cells in row 7 determined
by a value in a specific cell such as cell A1 (in this example would
have contained the number 4).

I do not seem to be able to functions of any kind in the range sum
expression?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to sum a variable number of items RobinC Excel Worksheet Functions 2 May 30th 08 08:14 AM
Hyperlink function fails when using variable row number Balex Excel Worksheet Functions 5 April 8th 06 06:35 AM
Sum cells based on a row variable and seperate column variable CheeseHeadTransplant Excel Worksheet Functions 10 September 23rd 05 06:59 PM
Performing a function on a column of variable length BeenThereGotLost Excel Worksheet Functions 3 July 1st 05 02:50 PM
return the column reference number of a function result Mahendhra Excel Discussion (Misc queries) 2 May 16th 05 12:46 PM


All times are GMT +1. The time now is 07:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"