Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 460
Default Rolling 12 moth formula

I would like to create a formula in Col A that would go out 12 columns (B -
M) and then be able to insert a new column B and have the formula remain
=Sum(B1:M1) and not change to =Sum(C1:N1). Is that possible?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Rolling 12 moth formula

Yes, simply change the formula in column A to
=SUM($B1:$M1)
that'll keep the column references from changing even when you insert the
new column B.

"Doug" wrote:

I would like to create a formula in Col A that would go out 12 columns (B -
M) and then be able to insert a new column B and have the formula remain
=Sum(B1:M1) and not change to =Sum(C1:N1). Is that possible?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 460
Default Rolling 12 moth formula

The formula still changes when I do that.

"JLatham" wrote:

Yes, simply change the formula in column A to
=SUM($B1:$M1)
that'll keep the column references from changing even when you insert the
new column B.

"Doug" wrote:

I would like to create a formula in Col A that would go out 12 columns (B -
M) and then be able to insert a new column B and have the formula remain
=Sum(B1:M1) and not change to =Sum(C1:N1). Is that possible?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Rolling 12 moth formula

Maybe

=SUM(INDIRECT("B1:M1"))

Mike

"Doug" wrote:

The formula still changes when I do that.

"JLatham" wrote:

Yes, simply change the formula in column A to
=SUM($B1:$M1)
that'll keep the column references from changing even when you insert the
new column B.

"Doug" wrote:

I would like to create a formula in Col A that would go out 12 columns (B -
M) and then be able to insert a new column B and have the formula remain
=Sum(B1:M1) and not change to =Sum(C1:N1). Is that possible?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 460
Default Rolling 12 moth formula

That did the trick. Thank you very much.

"Mike H" wrote:

Maybe

=SUM(INDIRECT("B1:M1"))

Mike

"Doug" wrote:

The formula still changes when I do that.

"JLatham" wrote:

Yes, simply change the formula in column A to
=SUM($B1:$M1)
that'll keep the column references from changing even when you insert the
new column B.

"Doug" wrote:

I would like to create a formula in Col A that would go out 12 columns (B -
M) and then be able to insert a new column B and have the formula remain
=Sum(B1:M1) and not change to =Sum(C1:N1). Is that possible?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Rolling 12 moth formula

Glad I could help and thanks for the feedback

Mike

"Doug" wrote:

That did the trick. Thank you very much.

"Mike H" wrote:

Maybe

=SUM(INDIRECT("B1:M1"))

Mike

"Doug" wrote:

The formula still changes when I do that.

"JLatham" wrote:

Yes, simply change the formula in column A to
=SUM($B1:$M1)
that'll keep the column references from changing even when you insert the
new column B.

"Doug" wrote:

I would like to create a formula in Col A that would go out 12 columns (B -
M) and then be able to insert a new column B and have the formula remain
=Sum(B1:M1) and not change to =Sum(C1:N1). Is that possible?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Rolling 12 moth formula

=SUM(INDIRECT("B1:M1")

Hope that helps.
--
John C


"Doug" wrote:

The formula still changes when I do that.

"JLatham" wrote:

Yes, simply change the formula in column A to
=SUM($B1:$M1)
that'll keep the column references from changing even when you insert the
new column B.

"Doug" wrote:

I would like to create a formula in Col A that would go out 12 columns (B -
M) and then be able to insert a new column B and have the formula remain
=Sum(B1:M1) and not change to =Sum(C1:N1). Is that possible?

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Rolling 12 moth formula

Which version of Excel works that way, as a matter of interest?
In Excel 2003, inserting a new column B will convert =SUM($B1:$M1) to
=SUM($C1:$N1)

The answer which I would give to Doug's question is =SUM(INDIRECT("B1:M1"))
--
David Biddulph

"JLatham" <HelpFrom @ Jlathamsite.com.(removethis) wrote in message
...
Yes, simply change the formula in column A to
=SUM($B1:$M1)
that'll keep the column references from changing even when you insert the
new column B.

"Doug" wrote:

I would like to create a formula in Col A that would go out 12 columns
(B -
M) and then be able to insert a new column B and have the formula remain
=Sum(B1:M1) and not change to =Sum(C1:N1). Is that possible?



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Rolling 12 moth formula

Probably what I get for writing without testing. Your (and Mike H's)
Indirect would seem to work much, much better. Glad I got caught in my error
early on.

But seems it OUGHT to work that way. If I I referred to Range("$B1:$M1") in
code it sure as hell wouldn't change I don't care how many rows or columns
you inserted, I'd get the value in cells B1 through M1 regardless.

"David Biddulph" wrote:

Which version of Excel works that way, as a matter of interest?
In Excel 2003, inserting a new column B will convert =SUM($B1:$M1) to
=SUM($C1:$N1)

The answer which I would give to Doug's question is =SUM(INDIRECT("B1:M1"))
--
David Biddulph

"JLatham" <HelpFrom @ Jlathamsite.com.(removethis) wrote in message
...
Yes, simply change the formula in column A to
=SUM($B1:$M1)
that'll keep the column references from changing even when you insert the
new column B.

"Doug" wrote:

I would like to create a formula in Col A that would go out 12 columns
(B -
M) and then be able to insert a new column B and have the formula remain
=Sum(B1:M1) and not change to =Sum(C1:N1). Is that possible?




  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Rolling 12 moth formula

If I I referred to Range("$B1:$M1") in
code it sure as hell wouldn't change I don't care how many rows or columns
you inserted, I'd get the value in cells B1 through M1 regardless.


And I think we can all agree you would but likewise if you inserted Rows the
1 wouldn't change to 2 either despite it being relative. I can see the point
of the dollar sign in Vb in things like 'activecell.formula ="=sum($A...' etc
but what is the purpose or point of $ in VB in instances like the one you
note?

Mike

"JLatham" wrote:

Probably what I get for writing without testing. Your (and Mike H's)
Indirect would seem to work much, much better. Glad I got caught in my error
early on.

But seems it OUGHT to work that way. If I I referred to Range("$B1:$M1") in
code it sure as hell wouldn't change I don't care how many rows or columns
you inserted, I'd get the value in cells B1 through M1 regardless.

"David Biddulph" wrote:

Which version of Excel works that way, as a matter of interest?
In Excel 2003, inserting a new column B will convert =SUM($B1:$M1) to
=SUM($C1:$N1)

The answer which I would give to Doug's question is =SUM(INDIRECT("B1:M1"))
--
David Biddulph

"JLatham" <HelpFrom @ Jlathamsite.com.(removethis) wrote in message
...
Yes, simply change the formula in column A to
=SUM($B1:$M1)
that'll keep the column references from changing even when you insert the
new column B.

"Doug" wrote:

I would like to create a formula in Col A that would go out 12 columns
(B -
M) and then be able to insert a new column B and have the formula remain
=Sum(B1:M1) and not change to =Sum(C1:N1). Is that possible?






  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Rolling 12 moth formula

Well, my big question is do $'s actually anchor the moth's to excel? How did
the OP actually get the 12 moth's into excel, cuz I think that would be a far
more difficult question.

:)
--
John C


"Mike H" wrote:

If I I referred to Range("$B1:$M1") in
code it sure as hell wouldn't change I don't care how many rows or columns
you inserted, I'd get the value in cells B1 through M1 regardless.


And I think we can all agree you would but likewise if you inserted Rows the
1 wouldn't change to 2 either despite it being relative. I can see the point
of the dollar sign in Vb in things like 'activecell.formula ="=sum($A...' etc
but what is the purpose or point of $ in VB in instances like the one you
note?

Mike

"JLatham" wrote:

Probably what I get for writing without testing. Your (and Mike H's)
Indirect would seem to work much, much better. Glad I got caught in my error
early on.

But seems it OUGHT to work that way. If I I referred to Range("$B1:$M1") in
code it sure as hell wouldn't change I don't care how many rows or columns
you inserted, I'd get the value in cells B1 through M1 regardless.

"David Biddulph" wrote:

Which version of Excel works that way, as a matter of interest?
In Excel 2003, inserting a new column B will convert =SUM($B1:$M1) to
=SUM($C1:$N1)

The answer which I would give to Doug's question is =SUM(INDIRECT("B1:M1"))
--
David Biddulph

"JLatham" <HelpFrom @ Jlathamsite.com.(removethis) wrote in message
...
Yes, simply change the formula in column A to
=SUM($B1:$M1)
that'll keep the column references from changing even when you insert the
new column B.

"Doug" wrote:

I would like to create a formula in Col A that would go out 12 columns
(B -
M) and then be able to insert a new column B and have the formula remain
=Sum(B1:M1) and not change to =Sum(C1:N1). Is that possible?



  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Rolling 12 moth formula

Mike, as in the example I gave - the $ serves no useful purpose in VBA.
However, if setting up a formula to be written to a cell, it would.
Bottom line here is that at the time I wrote my initial response, apparently
my body was contorted into a rather uncomfortable position and my head was in
a rather dark, dank location! However, thanks to John C, I have a plausible
excuse: had we been working with moths and not months or cells on an Excel
worksheet, my answer may have actually worked ;).

"Mike H" wrote:

If I I referred to Range("$B1:$M1") in
code it sure as hell wouldn't change I don't care how many rows or columns
you inserted, I'd get the value in cells B1 through M1 regardless.


And I think we can all agree you would but likewise if you inserted Rows the
1 wouldn't change to 2 either despite it being relative. I can see the point
of the dollar sign in Vb in things like 'activecell.formula ="=sum($A...' etc
but what is the purpose or point of $ in VB in instances like the one you
note?

Mike

"JLatham" wrote:

Probably what I get for writing without testing. Your (and Mike H's)
Indirect would seem to work much, much better. Glad I got caught in my error
early on.

But seems it OUGHT to work that way. If I I referred to Range("$B1:$M1") in
code it sure as hell wouldn't change I don't care how many rows or columns
you inserted, I'd get the value in cells B1 through M1 regardless.

"David Biddulph" wrote:

Which version of Excel works that way, as a matter of interest?
In Excel 2003, inserting a new column B will convert =SUM($B1:$M1) to
=SUM($C1:$N1)

The answer which I would give to Doug's question is =SUM(INDIRECT("B1:M1"))
--
David Biddulph

"JLatham" <HelpFrom @ Jlathamsite.com.(removethis) wrote in message
...
Yes, simply change the formula in column A to
=SUM($B1:$M1)
that'll keep the column references from changing even when you insert the
new column B.

"Doug" wrote:

I would like to create a formula in Col A that would go out 12 columns
(B -
M) and then be able to insert a new column B and have the formula remain
=Sum(B1:M1) and not change to =Sum(C1:N1). Is that possible?



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
I need help with a formula for rolling twelve months QD Excel Discussion (Misc queries) 0 January 1st 08 10:43 PM
Rolling Formula based on If Kristine Excel Worksheet Functions 2 December 15th 07 10:05 PM
rolling twelvemnoths formula for attendance calendar QD Excel Worksheet Functions 2 September 3rd 06 08:32 AM
Formula for calculating 12 month rolling period Stroodle Excel Discussion (Misc queries) 0 August 17th 06 03:16 PM
Z Chart i.e. top rolling annual bottom rolling monthly middle cum. wat prin Excel Worksheet Functions 0 January 28th 05 03:43 PM


All times are GMT +1. The time now is 02:24 AM.

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

About Us

"It's about Microsoft Excel"