PC Review


Reply
Thread Tools Rate Thread

Active Column Ref In a Formula

 
 
Glynn Taylor
Guest
Posts: n/a
 
      18th Feb 2008
My problem is summarised as follows:

A1 to, say, G1 contains a list of numbers

Formulas read:
In A1 =A1
In B1 =Sum(A1:B1)
In C1 =Sum(A1:C1)
In D1 =Sum(A11) etc... to =Sum(A1:G1)

Is it possible to have a formula which can datermine the column reference of
the cell containing the formula?
Some common element that replaces B1, C1, D1 etc. in the above example?

Thank you



 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      18th Feb 2008
If you insert:

=SUM(INDIRECT("A1:" & SUBSTITUTE((LEFT(ADDRESS(1,COLUMN()-1),3)),"$","") &
"1"))

you will get the sum of the values from A1 thru just before the column
containing the formula. For example, if you put the formula in Z1 you will
get the sum from A1 thru Y1
--
Gary''s Student - gsnu200769


"Glynn Taylor" wrote:

> My problem is summarised as follows:
>
> A1 to, say, G1 contains a list of numbers
>
> Formulas read:
> In A1 =A1
> In B1 =Sum(A1:B1)
> In C1 =Sum(A1:C1)
> In D1 =Sum(A11) etc... to =Sum(A1:G1)
>
> Is it possible to have a formula which can datermine the column reference of
> the cell containing the formula?
> Some common element that replaces B1, C1, D1 etc. in the above example?
>
> Thank you
>
>
>

 
Reply With Quote
 
Glynn Taylor
Guest
Posts: n/a
 
      18th Feb 2008
Hello Gary's Student

Thank you for your help.

I'll give it a try

Regards
Glynn

"Gary''s Student" wrote:

> If you insert:
>
> =SUM(INDIRECT("A1:" & SUBSTITUTE((LEFT(ADDRESS(1,COLUMN()-1),3)),"$","") &
> "1"))
>
> you will get the sum of the values from A1 thru just before the column
> containing the formula. For example, if you put the formula in Z1 you will
> get the sum from A1 thru Y1
> --
> Gary''s Student - gsnu200769
>
>
> "Glynn Taylor" wrote:
>
> > My problem is summarised as follows:
> >
> > A1 to, say, G1 contains a list of numbers
> >
> > Formulas read:
> > In A1 =A1
> > In B1 =Sum(A1:B1)
> > In C1 =Sum(A1:C1)
> > In D1 =Sum(A11) etc... to =Sum(A1:G1)
> >
> > Is it possible to have a formula which can datermine the column reference of
> > the cell containing the formula?
> > Some common element that replaces B1, C1, D1 etc. in the above example?
> >
> > Thank you
> >
> >
> >

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      18th Feb 2008
You may want to restate your question if Gary's Student's response doesn't work
for you.

Your formulas contain the cell that holds the formula. This will result in a
circular reference error.



Glynn Taylor wrote:
>
> My problem is summarised as follows:
>
> A1 to, say, G1 contains a list of numbers
>
> Formulas read:
> In A1 =A1
> In B1 =Sum(A1:B1)
> In C1 =Sum(A1:C1)
> In D1 =Sum(A11) etc... to =Sum(A1:G1)
>
> Is it possible to have a formula which can datermine the column reference of
> the cell containing the formula?
> Some common element that replaces B1, C1, D1 etc. in the above example?
>
> Thank you


--

Dave Peterson
 
Reply With Quote
 
Roger Govier
Guest
Posts: n/a
 
      18th Feb 2008
Hi

in B2 enter
=SUM($A$1:INDEX(1:1,COLUMN(B1)))
and copy across as far as required

--
Regards
Roger Govier

"Glynn Taylor" <(E-Mail Removed)> wrote in message
news:618BE108-28EA-4E27-B57D-(E-Mail Removed)...
> My problem is summarised as follows:
>
> A1 to, say, G1 contains a list of numbers
>
> Formulas read:
> In A1 =A1
> In B1 =Sum(A1:B1)
> In C1 =Sum(A1:C1)
> In D1 =Sum(A11) etc... to =Sum(A1:G1)
>
> Is it possible to have a formula which can datermine the column reference
> of
> the cell containing the formula?
> Some common element that replaces B1, C1, D1 etc. in the above example?
>
> Thank you
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy and Paste Formula from ActiveCell to cells in 13 columns priorto the active column sgltaylor Microsoft Excel Programming 1 30th Nov 2009 10:33 AM
A formula or macro that will place the date in an adjacent column Bany time something is typed in column A Mike C Microsoft Excel Programming 4 27th Feb 2008 01:57 AM
Active Column Ref in a Formula Glynn Taylor Microsoft Excel Discussion 2 15th Feb 2008 03:12 PM
how can I return the active row and active column? =?Utf-8?B?R3JlZw==?= Microsoft Excel Programming 2 3rd Feb 2005 07:38 PM
copying the column of the active cell to another column Paul James Microsoft Excel Programming 2 26th Feb 2004 08:04 PM


Features
 

Advertising
 

Newsgroups
 


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