Remember Me?

#1
March 23rd 06, 04:10 PM posted to microsoft.public.excel.misc
 William Posts: n/a
How do I sum numbers thru specifying the amount from another cell?

So this is what I was wondering on how to do:

I have a set of numbers, and I want to sum them, BUT I don't always want to
sum all of them. The amount to sum is specified thru another cell, and I am
always summing the numbers in order. Ex. if I type in a cell "5", it'll sum
the first 5 numbers, but if i type in 10, it'll sum the first 10 numbers. So
basically, the numnbers to sum are dependent on the number you input in the
one cell. I tried looking at SUMIF, but that only returns the sum if the
corresponding row of another column meets a criteria. The criteria for my
case is in the one cell. What equation do I use?

#2
March 23rd 06, 04:22 PM posted to microsoft.public.excel.misc
 Peo Sjoblom Posts: n/a
How do I sum numbers thru specifying the amount from another cell?

One way

=SUM(A1:INDEX(A1:A100,B1))

where you would put the number of rows you want to sum in B1, note that it
will sum the whole range if nothing is entered in B1 so if you don't want
that

=IF(B1="","",SUM(A1:INDEX(A1:A100,B1)))

--

Regards,

Peo Sjoblom

"William" wrote in message
...
So this is what I was wondering on how to do:

I have a set of numbers, and I want to sum them, BUT I don't always want
to
sum all of them. The amount to sum is specified thru another cell, and I
am
always summing the numbers in order. Ex. if I type in a cell "5", it'll
sum
the first 5 numbers, but if i type in 10, it'll sum the first 10 numbers.
So
basically, the numnbers to sum are dependent on the number you input in
the
one cell. I tried looking at SUMIF, but that only returns the sum if the
corresponding row of another column meets a criteria. The criteria for my
case is in the one cell. What equation do I use?

#3
March 23rd 06, 04:24 PM posted to microsoft.public.excel.misc
 bpeltzer Posts: n/a
How do I sum numbers thru specifying the amount from another cell?

=sum(offset(A1,0,0,5,1)) will sum the five cells starting in A1 and going
down through five cells. You could use a cell reference rather than 5:
=sum(offset(a1,0,0,b1,1))

"William" wrote:

So this is what I was wondering on how to do:

I have a set of numbers, and I want to sum them, BUT I don't always want to
sum all of them. The amount to sum is specified thru another cell, and I am
always summing the numbers in order. Ex. if I type in a cell "5", it'll sum
the first 5 numbers, but if i type in 10, it'll sum the first 10 numbers. So
basically, the numnbers to sum are dependent on the number you input in the
one cell. I tried looking at SUMIF, but that only returns the sum if the
corresponding row of another column meets a criteria. The criteria for my
case is in the one cell. What equation do I use?

#4
March 23rd 06, 04:30 PM posted to microsoft.public.excel.misc
 Biff Posts: n/a
How do I sum numbers thru specifying the amount from another cell?

Hi!

Try this:

The range of numbers is A1:A10. There can be no empty cells within the
range. B1 is the cell where you enter the number of cells to sum.

=SUM(A1:INDEX(A1:A10,B1))

Will there always be a number of cells that is at least equal to the number
selected? For example, you only 5 numbers in the range but the number
entered in cell B1 is 10?

Biff

"William" wrote in message
...
So this is what I was wondering on how to do:

I have a set of numbers, and I want to sum them, BUT I don't always want
to
sum all of them. The amount to sum is specified thru another cell, and I
am
always summing the numbers in order. Ex. if I type in a cell "5", it'll
sum
the first 5 numbers, but if i type in 10, it'll sum the first 10 numbers.
So
basically, the numnbers to sum are dependent on the number you input in
the
one cell. I tried looking at SUMIF, but that only returns the sum if the
corresponding row of another column meets a criteria. The criteria for my
case is in the one cell. What equation do I use?

#5
September 12th 09, 05:18 PM posted to microsoft.public.excel.misc
 external usenet poster First recorded activity by ExcelBanter: Sep 2009 Posts: 1
How do I sum numbers thru specifying the amount from another cell?

I cannot get SUMIF to work for me at all.

I have a Sum Range F9:F129 = numbers
I have a Criteria Range A9::A129=Dates
and I have a Criteria M2 (TODAY)
I want all numbers in the range F9:F129 to be added thus SUM all up to TODAY
<=M2 depending on Dates in column A9:A129 but it just comes back with nil it
doesn't seem to recognise that M2 is a number (TODAY) and thus it will not
calculate anything.

Chris

#6
September 12th 09, 05:36 PM posted to microsoft.public.excel.misc
 external usenet poster First recorded activity by ExcelBanter: Nov 2006 Posts: 15,768
How do I sum numbers thru specifying the amount from another cell?

What does your formula look like?

It should look like this:

=SUMIF(F9:F129,"<="&M2,A9:A129)

--
Biff
Microsoft Excel MVP

"Lost in Query" wrote in message
...
I cannot get SUMIF to work for me at all.

I have a Sum Range F9:F129 = numbers
I have a Criteria Range A9::A129=Dates
and I have a Criteria M2 (TODAY)
I want all numbers in the range F9:F129 to be added thus SUM all up to
TODAY
<=M2 depending on Dates in column A9:A129 but it just comes back with nil
it
doesn't seem to recognise that M2 is a number (TODAY) and thus it will not
calculate anything.

Chris

#7
September 17th 09, 07:57 PM posted to microsoft.public.excel.misc
 external usenet poster First recorded activity by ExcelBanter: Sep 2009 Posts: 1
How do I sum numbers thru specifying the amount from another c

I'm trying to use multiple criteria in my SUMIF and COUNTIF functions and I'm
unable to figure out how to nest/combine them using the same rationale as
shown below [ =SUMIF(F9:F129,"<="&M2,A9:A129) ]

I want to do something that would be like: and("<="&M2,"="&M3)
but can't get the syntax right...

Thanks

"T. Valko" wrote:

What does your formula look like?

It should look like this:

=SUMIF(F9:F129,"<="&M2,A9:A129)

--
Biff
Microsoft Excel MVP

"Lost in Query" wrote in message
...
I cannot get SUMIF to work for me at all.

I have a Sum Range F9:F129 = numbers
I have a Criteria Range A9::A129=Dates
and I have a Criteria M2 (TODAY)
I want all numbers in the range F9:F129 to be added thus SUM all up to
TODAY
<=M2 depending on Dates in column A9:A129 but it just comes back with nil
it
doesn't seem to recognise that M2 is a number (TODAY) and thus it will not
calculate anything.

Chris

#8
September 17th 09, 09:49 PM posted to microsoft.public.excel.misc
 external usenet poster First recorded activity by ExcelBanter: Nov 2006 Posts: 15,768
How do I sum numbers thru specifying the amount from another c

If you want to sum based on a date range:

M2 = lower boundary date
M3 = upper boundary date

=SUMIF(F9:F129,"="&M2,A9:A129)-SUMIF(F9:F129,""&M3,A9:A129)

Note that the boundary dates are included in the sum.

Format as General or Number

--
Biff
Microsoft Excel MVP

"DaleS" wrote in message
...
I'm trying to use multiple criteria in my SUMIF and COUNTIF functions and
I'm
unable to figure out how to nest/combine them using the same rationale as
shown below [ =SUMIF(F9:F129,"<="&M2,A9:A129) ]

I want to do something that would be like: and("<="&M2,"="&M3)
but can't get the syntax right...

Thanks

"T. Valko" wrote:

What does your formula look like?

It should look like this:

=SUMIF(F9:F129,"<="&M2,A9:A129)

--
Biff
Microsoft Excel MVP

"Lost in Query" wrote in message
...
I cannot get SUMIF to work for me at all.

I have a Sum Range F9:F129 = numbers
I have a Criteria Range A9::A129=Dates
and I have a Criteria M2 (TODAY)
I want all numbers in the range F9:F129 to be added thus SUM all up to
TODAY
<=M2 depending on Dates in column A9:A129 but it just comes back with
nil
it
doesn't seem to recognise that M2 is a number (TODAY) and thus it will
not
calculate anything.

Chris

 Posting Rules Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On

 Similar Threads Thread Thread Starter Forum Replies Last Post Jeff Excel Worksheet Functions 6 August 20th 08 04:03 PM mato nanjin Excel Discussion (Misc queries) 0 December 30th 05 03:09 PM Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM Laudan Excel Worksheet Functions 4 April 11th 05 08:13 PM BecG Excel Discussion (Misc queries) 1 December 8th 04 04:55 PM

All times are GMT +1. The time now is 09:52 PM.