PC Review


Reply
Thread Tools Rate Thread

Making dynamic formulas

 
 
Snoopy
Guest
Posts: n/a
 
      10th Nov 2006
Hey guys
I have this idea of making my summary useing dynamic range-reference.

EXAMPLE
Monthly amounts is placed i cell A4 to L4 (Jan...Dec)
My issue is to make the formula: =SUM(A4:?4) dynamic to respond to an
index from 1 to 12 and by this re-construct itself.
The months in indexed like this:
January (first month i the summary) is indexed as value 1 in cell A1
The last index in the summary is (ex) 10 representing October is
indexed in cell B1

Index 1 construct the formula =SUM(A4:A4)
Index 2 construct the formula =SUM(A4:B4)
Index 10 construct the formula =SUM(A4:J4)
and so on.

So far I have made a "formual" by using the =ADRESS formula to create
the expression of the cellreferences that marks the range.

LIKE THIS
="=SUM("&ADRESSE(A1;A1)&":"&ADRESSE(A1;B1)&")"
This expression is perfectly dynamic. A copy/paste special-value make
the cell content
=SUM($C$4:$J$4)

BUT
This appears as a text and NOT as a formula!

MY QUESTION IS
How do I get further making this expression work as a real dynamic
formula
I have tried to use replace-function in various way - without suksess.

Please give me a pleasant weekend by guiding me throug this problem
Regards Snoopy

 
Reply With Quote
 
 
 
 
Niek Otten
Guest
Posts: n/a
 
      10th Nov 2006
Hi Snoopy,

Look in HELP for the INDIRECT() function

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Snoopy" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
| Hey guys
| I have this idea of making my summary useing dynamic range-reference.
|
| EXAMPLE
| Monthly amounts is placed i cell A4 to L4 (Jan...Dec)
| My issue is to make the formula: =SUM(A4:?4) dynamic to respond to an
| index from 1 to 12 and by this re-construct itself.
| The months in indexed like this:
| January (first month i the summary) is indexed as value 1 in cell A1
| The last index in the summary is (ex) 10 representing October is
| indexed in cell B1
|
| Index 1 construct the formula =SUM(A4:A4)
| Index 2 construct the formula =SUM(A4:B4)
| Index 10 construct the formula =SUM(A4:J4)
| and so on.
|
| So far I have made a "formual" by using the =ADRESS formula to create
| the expression of the cellreferences that marks the range.
|
| LIKE THIS
| ="=SUM("&ADRESSE(A1;A1)&":"&ADRESSE(A1;B1)&")"
| This expression is perfectly dynamic. A copy/paste special-value make
| the cell content
| =SUM($C$4:$J$4)
|
| BUT
| This appears as a text and NOT as a formula!
|
| MY QUESTION IS
| How do I get further making this expression work as a real dynamic
| formula
| I have tried to use replace-function in various way - without suksess.
|
| Please give me a pleasant weekend by guiding me throug this problem
| Regards Snoopy
|


 
Reply With Quote
 
Snoopy
Guest
Posts: n/a
 
      10th Nov 2006
Thanks -
I'm trying to catch your point in using the INDIRECT-formula, but can't
see how this will effect on my problem...
May be you have seen something beyond my understanding? In that case
please tel me more about it.

Regards Snoopy


Niek Otten skrev:
> Hi Snoopy,
>
> Look in HELP for the INDIRECT() function
>
> --
> Kind regards,
>
> Niek Otten
> Microsoft MVP - Excel
>
> "Snoopy" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> | Hey guys
> | I have this idea of making my summary useing dynamic range-reference.
> |
> | EXAMPLE
> | Monthly amounts is placed i cell A4 to L4 (Jan...Dec)
> | My issue is to make the formula: =SUM(A4:?4) dynamic to respond to an
> | index from 1 to 12 and by this re-construct itself.
> | The months in indexed like this:
> | January (first month i the summary) is indexed as value 1 in cell A1
> | The last index in the summary is (ex) 10 representing October is
> | indexed in cell B1
> |
> | Index 1 construct the formula =SUM(A4:A4)
> | Index 2 construct the formula =SUM(A4:B4)
> | Index 10 construct the formula =SUM(A4:J4)
> | and so on.
> |
> | So far I have made a "formual" by using the =ADRESS formula to create
> | the expression of the cellreferences that marks the range.
> |
> | LIKE THIS
> | ="=SUM("&ADRESSE(A1;A1)&":"&ADRESSE(A1;B1)&")"
> | This expression is perfectly dynamic. A copy/paste special-value make
> | the cell content
> | =SUM($C$4:$J$4)
> |
> | BUT
> | This appears as a text and NOT as a formula!
> |
> | MY QUESTION IS
> | How do I get further making this expression work as a real dynamic
> | formula
> | I have tried to use replace-function in various way - without suksess.
> |
> | Please give me a pleasant weekend by guiding me throug this problem
> | Regards Snoopy
> |


 
Reply With Quote
 
Arvi Laanemets
Guest
Posts: n/a
 
      10th Nov 2006
Hi

=SUM(OFFSET($A$4,,$A$1-1,,$B$1-$A$1+1)


--
Arvi Laanemets
( My real mail address: arvi.laanemets<at>tarkon.ee )


"Snoopy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hey guys
> I have this idea of making my summary useing dynamic range-reference.
>
> EXAMPLE
> Monthly amounts is placed i cell A4 to L4 (Jan...Dec)
> My issue is to make the formula: =SUM(A4:?4) dynamic to respond to an
> index from 1 to 12 and by this re-construct itself.
> The months in indexed like this:
> January (first month i the summary) is indexed as value 1 in cell A1
> The last index in the summary is (ex) 10 representing October is
> indexed in cell B1
>
> Index 1 construct the formula =SUM(A4:A4)
> Index 2 construct the formula =SUM(A4:B4)
> Index 10 construct the formula =SUM(A4:J4)
> and so on.
>
> So far I have made a "formual" by using the =ADRESS formula to create
> the expression of the cellreferences that marks the range.
>
> LIKE THIS
> ="=SUM("&ADRESSE(A1;A1)&":"&ADRESSE(A1;B1)&")"
> This expression is perfectly dynamic. A copy/paste special-value make
> the cell content
> =SUM($C$4:$J$4)
>
> BUT
> This appears as a text and NOT as a formula!
>
> MY QUESTION IS
> How do I get further making this expression work as a real dynamic
> formula
> I have tried to use replace-function in various way - without suksess.
>
> Please give me a pleasant weekend by guiding me throug this problem
> Regards Snoopy
>



 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      10th Nov 2006
=SUM(INDEX(A4:L4,1,A1):INDEX(A4:L4,1,B1))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Snoopy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hey guys
> I have this idea of making my summary useing dynamic range-reference.
>
> EXAMPLE
> Monthly amounts is placed i cell A4 to L4 (Jan...Dec)
> My issue is to make the formula: =SUM(A4:?4) dynamic to respond to an
> index from 1 to 12 and by this re-construct itself.
> The months in indexed like this:
> January (first month i the summary) is indexed as value 1 in cell A1
> The last index in the summary is (ex) 10 representing October is
> indexed in cell B1
>
> Index 1 construct the formula =SUM(A4:A4)
> Index 2 construct the formula =SUM(A4:B4)
> Index 10 construct the formula =SUM(A4:J4)
> and so on.
>
> So far I have made a "formual" by using the =ADRESS formula to create
> the expression of the cellreferences that marks the range.
>
> LIKE THIS
> ="=SUM("&ADRESSE(A1;A1)&":"&ADRESSE(A1;B1)&")"
> This expression is perfectly dynamic. A copy/paste special-value make
> the cell content
> =SUM($C$4:$J$4)
>
> BUT
> This appears as a text and NOT as a formula!
>
> MY QUESTION IS
> How do I get further making this expression work as a real dynamic
> formula
> I have tried to use replace-function in various way - without suksess.
>
> Please give me a pleasant weekend by guiding me throug this problem
> Regards Snoopy
>



 
Reply With Quote
 
Lori
Guest
Posts: n/a
 
      10th Nov 2006
There are several ways to evaluate a collection of formulas like yours:

i) Select a column then Data > Text to columns > Finish (assuming
tab-delimited default)

ii) Choose Edit > Replace with the options Find: "=", Replace with: "="
to force a recalculation of all formulas

iii) Select columns or whole sheet and copy to office clip board
(Ctrl+C twice) then paste back using icon (for this method you do not
need to paste values before but it needs enough data to be copied as
text - about 2K)

Your approach does have the advantage that it does not make use of
volatile or dynamic ranges like some of the other suggestions which can
lead to the save changes prompt appearing by default.

Snoopy wrote:

> Hey guys
> I have this idea of making my summary useing dynamic range-reference.
>
> EXAMPLE
> Monthly amounts is placed i cell A4 to L4 (Jan...Dec)
> My issue is to make the formula: =SUM(A4:?4) dynamic to respond to an
> index from 1 to 12 and by this re-construct itself.
> The months in indexed like this:
> January (first month i the summary) is indexed as value 1 in cell A1
> The last index in the summary is (ex) 10 representing October is
> indexed in cell B1
>
> Index 1 construct the formula =SUM(A4:A4)
> Index 2 construct the formula =SUM(A4:B4)
> Index 10 construct the formula =SUM(A4:J4)
> and so on.
>
> So far I have made a "formual" by using the =ADRESS formula to create
> the expression of the cellreferences that marks the range.
>
> LIKE THIS
> ="=SUM("&ADRESSE(A1;A1)&":"&ADRESSE(A1;B1)&")"
> This expression is perfectly dynamic. A copy/paste special-value make
> the cell content
> =SUM($C$4:$J$4)
>
> BUT
> This appears as a text and NOT as a formula!
>
> MY QUESTION IS
> How do I get further making this expression work as a real dynamic
> formula
> I have tried to use replace-function in various way - without suksess.
>
> Please give me a pleasant weekend by guiding me throug this problem
> Regards Snoopy


 
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
Re: Help making this macro dynamic :) Tim Williams Microsoft Excel Programming 0 30th Mar 2010 02:46 AM
making a dynamic formulae victor24 Microsoft Access External Data 0 11th Sep 2007 10:39 AM
making dynamic buffer in VB.net to use in C dll vinbelgian Microsoft VB .NET 0 22nd Dec 2006 02:59 PM
Making condition dynamic? aposatsk Microsoft Excel Misc 3 16th Aug 2006 02:43 PM
Dynamic Formulas with Dynamic Ranges =?Utf-8?B?UmFscGggSG93YXJ0aA==?= Microsoft Excel Worksheet Functions 5 21st Jan 2005 09:44 AM


Features
 

Advertising
 

Newsgroups
 


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