Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default entering function results into another function

Is this possible? =sum(worksheet1:(RESULT OF N20)!L20)
with N20 having the formula to display the worksheet name in it?
not sure how to put in the (RESULT OF N20) into the formula if it is even
possible.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default entering function results into another function

Try
=SUM(INDIRECT("'" & N20 & "'!L20"))

basically construct a string which gives you the address and pass that to
INDIRECT...
Since you have only one cell L20 then why are you using SUM? If you just
need the value in L20 then use
INDIRECT("'" & N20 & "'!L20")

Also if worksheet name does not have spaces then you can use
=INDIRECT(N20 & "!L20")

"excelhurtsme" wrote:

Is this possible? =sum(worksheet1:(RESULT OF N20)!L20)
with N20 having the formula to display the worksheet name in it?
not sure how to put in the (RESULT OF N20) into the formula if it is even
possible.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default entering function results into another function

Sheeloo,

OP is trying to sum across multiple sheets, not just the one value.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Sheeloo" wrote:

Try
=SUM(INDIRECT("'" & N20 & "'!L20"))

basically construct a string which gives you the address and pass that to
INDIRECT...
Since you have only one cell L20 then why are you using SUM? If you just
need the value in L20 then use
INDIRECT("'" & N20 & "'!L20")

Also if worksheet name does not have spaces then you can use
=INDIRECT(N20 & "!L20")

"excelhurtsme" wrote:

Is this possible? =sum(worksheet1:(RESULT OF N20)!L20)
with N20 having the formula to display the worksheet name in it?
not sure how to put in the (RESULT OF N20) into the formula if it is even
possible.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default entering function results into another function

I'm assuming that Sheet1!N20 contains the name of a worksheet from
which you want to get the value in L20. You can use the INDIRECT
function to do this:

=SUM(INDIRECT(Sheet1!N20&"!L20"))

Here, INDIRECT takes the sheet name from Sheet1!N20, appends "L20" to
it, and returns the SUM. So, if Sheet1!N20 contains the string
"Sheet3" (sans quotes), the formula is the same as

=SUM(Sheet3!L20)

You can use INDIRECT to convert any arbitrary text string into an
actual range reference that can be used with other functions.


Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Thu, 11 Dec 2008 12:26:01 -0800, exchequers
wrote:

Is this possible? =sum(worksheet1:(RESULT OF N20)!L20)
with N20 having the formula to display the worksheet name in it?
not sure how to put in the (RESULT OF N20) into the formula if it is even
possible.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default entering function results into another function

Chip,
Your formula is only looking at one sheet. OP wants to sum across multiple
sheets.
I'm thinking
=SUM(INDIRECT("Sheet1:"&N20 & "!L20"))
should work, but I can not quite get it to. Hopefully someone else can
elaborate, or figure out what I'm missing.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Chip Pearson" wrote:

I'm assuming that Sheet1!N20 contains the name of a worksheet from
which you want to get the value in L20. You can use the INDIRECT
function to do this:

=SUM(INDIRECT(Sheet1!N20&"!L20"))

Here, INDIRECT takes the sheet name from Sheet1!N20, appends "L20" to
it, and returns the SUM. So, if Sheet1!N20 contains the string
"Sheet3" (sans quotes), the formula is the same as

=SUM(Sheet3!L20)

You can use INDIRECT to convert any arbitrary text string into an
actual range reference that can be used with other functions.


Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Thu, 11 Dec 2008 12:26:01 -0800, exchequers
wrote:

Is this possible? =sum(worksheet1:(RESULT OF N20)!L20)
with N20 having the formula to display the worksheet name in it?
not sure how to put in the (RESULT OF N20) into the formula if it is even
possible.




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default entering function results into another function

I am sorry I wasn't clear enough, the result of the formula I want to enter
into the sum formula is a worksheet name but not the first worksheet. I am
trying to come up with a way to sum up a certain cell across multiple
worksheets but with the worksheets not created yet. I am building a daily
report template that includes man hours on a job, the man hours need to be
totalled on a daily basis. As each worksheet is created it needs to include
itself and all previous worksheets into the total. Building dummy sheets
before and after gives a running total but changes the total to date values
of the sheets before the last to include all sheets. I need the formula to
update itself every time a worksheet is created.
=SUM(worksheet1:worksheet2!L20)
=SUM(worksheet1:worksheet3!L20)
=SUM(worksheet1:worksheet4!L20) and so on as sheets are built

I have included in a hidden cell the formula that puts the worksheet name
into that cell and it updates itself beautifully as new worksheets are
created. I just want to know if the result of that cell can somehow be
entered as the end worksheet in the sum formula?

Any help would be appreciated!

"Chip Pearson" wrote:

I'm assuming that Sheet1!N20 contains the name of a worksheet from
which you want to get the value in L20. You can use the INDIRECT
function to do this:

=SUM(INDIRECT(Sheet1!N20&"!L20"))

Here, INDIRECT takes the sheet name from Sheet1!N20, appends "L20" to
it, and returns the SUM. So, if Sheet1!N20 contains the string
"Sheet3" (sans quotes), the formula is the same as

=SUM(Sheet3!L20)

You can use INDIRECT to convert any arbitrary text string into an
actual range reference that can be used with other functions.


Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Thu, 11 Dec 2008 12:26:01 -0800, exchequers
wrote:

Is this possible? =sum(worksheet1:(RESULT OF N20)!L20)
with N20 having the formula to display the worksheet name in it?
not sure how to put in the (RESULT OF N20) into the formula if it is even
possible.


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default entering function results into another function

Try
=sum(indirect("worksheet1:" & n20 & "!L20") )

"excelhurtsme" wrote:

I am sorry I wasn't clear enough, the result of the formula I want to enter
into the sum formula is a worksheet name but not the first worksheet. I am
trying to come up with a way to sum up a certain cell across multiple
worksheets but with the worksheets not created yet. I am building a daily
report template that includes man hours on a job, the man hours need to be
totalled on a daily basis. As each worksheet is created it needs to include
itself and all previous worksheets into the total. Building dummy sheets
before and after gives a running total but changes the total to date values
of the sheets before the last to include all sheets. I need the formula to
update itself every time a worksheet is created.
=SUM(worksheet1:worksheet2!L20)
=SUM(worksheet1:worksheet3!L20)
=SUM(worksheet1:worksheet4!L20) and so on as sheets are built

I have included in a hidden cell the formula that puts the worksheet name
into that cell and it updates itself beautifully as new worksheets are
created. I just want to know if the result of that cell can somehow be
entered as the end worksheet in the sum formula?

Any help would be appreciated!

"Chip Pearson" wrote:

I'm assuming that Sheet1!N20 contains the name of a worksheet from
which you want to get the value in L20. You can use the INDIRECT
function to do this:

=SUM(INDIRECT(Sheet1!N20&"!L20"))

Here, INDIRECT takes the sheet name from Sheet1!N20, appends "L20" to
it, and returns the SUM. So, if Sheet1!N20 contains the string
"Sheet3" (sans quotes), the formula is the same as

=SUM(Sheet3!L20)

You can use INDIRECT to convert any arbitrary text string into an
actual range reference that can be used with other functions.


Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Thu, 11 Dec 2008 12:26:01 -0800, exchequers
wrote:

Is this possible? =sum(worksheet1:(RESULT OF N20)!L20)
with N20 having the formula to display the worksheet name in it?
not sure how to put in the (RESULT OF N20) into the formula if it is even
possible.


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default entering function results into another function

Sheeloo
I tried the formula below and it gave me a #ref error in the cell, but I
think you are on the right track. Any other ideas?

"Sheeloo" wrote:

Try
=sum(indirect("worksheet1:" & n20 & "!L20") )

"excelhurtsme" wrote:

I am sorry I wasn't clear enough, the result of the formula I want to enter
into the sum formula is a worksheet name but not the first worksheet. I am
trying to come up with a way to sum up a certain cell across multiple
worksheets but with the worksheets not created yet. I am building a daily
report template that includes man hours on a job, the man hours need to be
totalled on a daily basis. As each worksheet is created it needs to include
itself and all previous worksheets into the total. Building dummy sheets
before and after gives a running total but changes the total to date values
of the sheets before the last to include all sheets. I need the formula to
update itself every time a worksheet is created.
=SUM(worksheet1:worksheet2!L20)
=SUM(worksheet1:worksheet3!L20)
=SUM(worksheet1:worksheet4!L20) and so on as sheets are built

I have included in a hidden cell the formula that puts the worksheet name
into that cell and it updates itself beautifully as new worksheets are
created. I just want to know if the result of that cell can somehow be
entered as the end worksheet in the sum formula?

Any help would be appreciated!

"Chip Pearson" wrote:

I'm assuming that Sheet1!N20 contains the name of a worksheet from
which you want to get the value in L20. You can use the INDIRECT
function to do this:

=SUM(INDIRECT(Sheet1!N20&"!L20"))

Here, INDIRECT takes the sheet name from Sheet1!N20, appends "L20" to
it, and returns the SUM. So, if Sheet1!N20 contains the string
"Sheet3" (sans quotes), the formula is the same as

=SUM(Sheet3!L20)

You can use INDIRECT to convert any arbitrary text string into an
actual range reference that can be used with other functions.


Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Thu, 11 Dec 2008 12:26:01 -0800, exchequers
wrote:

Is this possible? =sum(worksheet1:(RESULT OF N20)!L20)
with N20 having the formula to display the worksheet name in it?
not sure how to put in the (RESULT OF N20) into the formula if it is even
possible.

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default entering function results into another function

See Bernard's response...

"excelhurtsme" wrote:

Sheeloo
I tried the formula below and it gave me a #ref error in the cell, but I
think you are on the right track. Any other ideas?


  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default entering function results into another function

If you just wanted the value in L20 from the sheet named in N20 you would
use
=INDIRECT(N2&"!L20")

So you might think you could use =SUM(INDIRECT("Sheet1:"&N20&"!L20")) but
INDIRECT does not support 3D references.

Do the sheet names form a nice series like Sheet1, Sheet2, ....Sheet10? If
so there is a nice trick shown in
http://groups.google.com/group/micro...816df8027ba006


By the way: The phase I think you wanted was "Value RETURNED by formula in
N20"

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"excelhurtsme" wrote in message
...
Is this possible? =sum(worksheet1:(RESULT OF N20)!L20)
with N20 having the formula to display the worksheet name in it?
not sure how to put in the (RESULT OF N20) into the formula if it is even
possible.





  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default entering function results into another function

If INDIRECT does not support 3D references, that explains why I could not get
my earlier idea to work. Sorry excelhurtsme.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Bernard Liengme" wrote:

If you just wanted the value in L20 from the sheet named in N20 you would
use
=INDIRECT(N2&"!L20")

So you might think you could use =SUM(INDIRECT("Sheet1:"&N20&"!L20")) but
INDIRECT does not support 3D references.

Do the sheet names form a nice series like Sheet1, Sheet2, ....Sheet10? If
so there is a nice trick shown in
http://groups.google.com/group/micro...816df8027ba006


By the way: The phase I think you wanted was "Value RETURNED by formula in
N20"

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"excelhurtsme" wrote in message
...
Is this possible? =sum(worksheet1:(RESULT OF N20)!L20)
with N20 having the formula to display the worksheet name in it?
not sure how to put in the (RESULT OF N20) into the formula if it is even
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
entering values without changing the function in the cell Shea LaRoux Excel Worksheet Functions 2 December 13th 07 09:33 AM
how do you write format results of a function within a function? sangee Excel Worksheet Functions 3 June 14th 07 12:45 AM
after entering insert function my cells run down and off page ced Excel Discussion (Misc queries) 1 February 18th 07 05:41 PM
Sometimes entering simple function causes it to occupy two cells, why? [email protected] Excel Worksheet Functions 2 November 29th 06 06:37 PM
Using function results as parameters in another function Steve Haack Excel Worksheet Functions 1 April 24th 05 11:39 PM


All times are GMT +1. The time now is 08:18 PM.

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"