View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Request for formula

Meant to add that because of this potential error I'll use it the way you
suggest in future.

Thanks again

"Mike H" wrote:

Hi,

That's interesting that using negative width giving problems, I always used
it that way because I think it's quite intuative when you look at the formula
and I've never experienced problems. Thanks for the links.

Mike

"Lars-Åke Aspelin" wrote:

I read in the help for OFFSET function that width must be a positive
number, see
http://office.microsoft.com/en-us/ex...092081033.aspx
http://office.microsoft.com/en-us/ex...624151033.aspx
but sometimes there are some undocumented features that can be useful,
so that's why I asked you about the negative width.

After posting I found this page where it is stated that a negative
width could give problems in earlier versions of Excel, see
http://support.microsoft.com/kb/184109
So, the advantage is to avoid this (possible) problem.

The change from B2 to A2 is just to be able to handle possible numeric
names.

Lars-Åke

On Sun, 1 Feb 2009 01:14:00 -0800, Mike H
wrote:

Hi,


What advantage do you see in the change you made to my formula?


Mike

"Lars-Åke Aspelin" wrote:


Is the negative width an undocumented feature of the offset formula?

I modified Mike's formula slightly:

=SUM(OFFSET(B2,,COUNT(B2:Z2)-4,,4))

Change Z to whatever is your rightmost month column.

Lars-Åke

On Sun, 1 Feb 2009 00:40:00 -0800, Mike H
wrote:

Hi,

Try

=SUM(OFFSET(A2,,COUNT(A2:P2)-1,,-4))

Mike

"Eddie" wrote:

A B C D E F ......... AA
Name Jan Feb Mar Apr May........
1 a 10 9 22 15 15
2 b 12 3 11 18 12
3 c 12 11 16 17 23
4 d 23 22 12 21 22

I am using office 2007,I will enter the figure every month into this
worksheet. what formula should I use to sum the latest 4 months of figure and
show it in column AA?

Thank you