Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 414
Default Indirect function

i have a workbook containing calendars of different persons.

each calendar has the same formatting. the sheets' names are composed of
the surname & name of the person concerned (e.g. "SmithW", "DoverG").

in each sheet, i named the following rows:
- date : PER_[+Letter] ranging from B1 to IV1
- value : VAL_[+Letter] ranging from B2 to IV2

i.e.:
- in the calendar of SmithW, the date row is named "PER_A" and the value row
"VAL_A"
- in the calendar of DoverG, the date row is named "PER_B" and the value row
"VAL_B"

i would now like to sum all the values in these different worksheets where a
date condition is met. so add all the values from SmithW and DoverG for
July-2007.

to do so, i used the following function :

=SUMIF(INDIRECT("PER_"&{"A";"B";"C";"D";"E";"F";"G ";"H";"I";"J";"K"});N3;INDIRECT("VAL_"&{"A";"B";"C ";"D";"E";"F";"G";"H";"I";"J";"K"}))

however, the only values that are returned are those from SmithW.

when i change the formula as follows:
=SUMIF(INDIRECT("PER_"&{"B"});N3;INDIRECT("EU_"&{" B"}))
the values of DoverG are returned correctly.

i use ";" because i use the european version of excel 2003. when i use ","
an error is returned. i also tried changing the "{}" brackets into "()", but
that didn't work either.

questions:
- how does the indirect function work?
- is it possible to add 'wildcards' to the function in order to reduce its
size. for example : =SUMIF(INDIRECT("PER_"&{*});N3;INDIRECT("EU_"&{*}) )
where * is the wildcard

thanks for helping.
andy
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Indirect function

Try:

=SUMPRODUCT(SUMIF(INDIRECT("'"&$N$4:$N$30&"'!B1:IV 1"),"=" &
N3,INDIRECT("'"&$N$4:$N$30&"'!B2:IV2")))

Enter with Ctrl+Shift+Enter

N4 to N30 contain your worksheet names

HTH

"andy" wrote:

i have a workbook containing calendars of different persons.

each calendar has the same formatting. the sheets' names are composed of
the surname & name of the person concerned (e.g. "SmithW", "DoverG").

in each sheet, i named the following rows:
- date : PER_[+Letter] ranging from B1 to IV1
- value : VAL_[+Letter] ranging from B2 to IV2

i.e.:
- in the calendar of SmithW, the date row is named "PER_A" and the value row
"VAL_A"
- in the calendar of DoverG, the date row is named "PER_B" and the value row
"VAL_B"

i would now like to sum all the values in these different worksheets where a
date condition is met. so add all the values from SmithW and DoverG for
July-2007.

to do so, i used the following function :

=SUMIF(INDIRECT("PER_"&{"A";"B";"C";"D";"E";"F";"G ";"H";"I";"J";"K"});N3;INDIRECT("VAL_"&{"A";"B";"C ";"D";"E";"F";"G";"H";"I";"J";"K"}))

however, the only values that are returned are those from SmithW.

when i change the formula as follows:
=SUMIF(INDIRECT("PER_"&{"B"});N3;INDIRECT("EU_"&{" B"}))
the values of DoverG are returned correctly.

i use ";" because i use the european version of excel 2003. when i use ","
an error is returned. i also tried changing the "{}" brackets into "()", but
that didn't work either.

questions:
- how does the indirect function work?
- is it possible to add 'wildcards' to the function in order to reduce its
size. for example : =SUMIF(INDIRECT("PER_"&{*});N3;INDIRECT("EU_"&{*}) )
where * is the wildcard

thanks for helping.
andy

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Indirect function

,"="&N3,

can be replaced by

,$N3,

only when you use <=<= do you really need the ampersand


not that it really matters since it works


--
Regards,

Peo Sjoblom




"Toppers" wrote in message
...
Try:

=SUMPRODUCT(SUMIF(INDIRECT("'"&$N$4:$N$30&"'!B1:IV 1"),"=" &
N3,INDIRECT("'"&$N$4:$N$30&"'!B2:IV2")))

Enter with Ctrl+Shift+Enter

N4 to N30 contain your worksheet names

HTH

"andy" wrote:

i have a workbook containing calendars of different persons.

each calendar has the same formatting. the sheets' names are composed of
the surname & name of the person concerned (e.g. "SmithW", "DoverG").

in each sheet, i named the following rows:
- date : PER_[+Letter] ranging from B1 to IV1
- value : VAL_[+Letter] ranging from B2 to IV2

i.e.:
- in the calendar of SmithW, the date row is named "PER_A" and the value
row
"VAL_A"
- in the calendar of DoverG, the date row is named "PER_B" and the value
row
"VAL_B"

i would now like to sum all the values in these different worksheets
where a
date condition is met. so add all the values from SmithW and DoverG for
July-2007.

to do so, i used the following function :

=SUMIF(INDIRECT("PER_"&{"A";"B";"C";"D";"E";"F";"G ";"H";"I";"J";"K"});N3;INDIRECT("VAL_"&{"A";"B";"C ";"D";"E";"F";"G";"H";"I";"J";"K"}))

however, the only values that are returned are those from SmithW.

when i change the formula as follows:
=SUMIF(INDIRECT("PER_"&{"B"});N3;INDIRECT("EU_"&{" B"}))
the values of DoverG are returned correctly.

i use ";" because i use the european version of excel 2003. when i use
","
an error is returned. i also tried changing the "{}" brackets into "()",
but
that didn't work either.

questions:
- how does the indirect function work?
- is it possible to add 'wildcards' to the function in order to reduce
its
size. for example : =SUMIF(INDIRECT("PER_"&{*});N3;INDIRECT("EU_"&{*}) )
where * is the wildcard

thanks for helping.
andy



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Indirect function

Another variant: "MySheets" is a named range containing your list of sheets

=SUMPRODUCT(SUMIF(INDIRECT("'"&MySheets&"'!B1:IV1" ),
$N$3,INDIRECT("'"&MySheets&"'!B2:IV2")))


"Peo Sjoblom" wrote:

,"="&N3,

can be replaced by

,$N3,

only when you use <=<= do you really need the ampersand


not that it really matters since it works


--
Regards,

Peo Sjoblom




"Toppers" wrote in message
...
Try:

=SUMPRODUCT(SUMIF(INDIRECT("'"&$N$4:$N$30&"'!B1:IV 1"),"=" &
N3,INDIRECT("'"&$N$4:$N$30&"'!B2:IV2")))

Enter with Ctrl+Shift+Enter

N4 to N30 contain your worksheet names

HTH

"andy" wrote:

i have a workbook containing calendars of different persons.

each calendar has the same formatting. the sheets' names are composed of
the surname & name of the person concerned (e.g. "SmithW", "DoverG").

in each sheet, i named the following rows:
- date : PER_[+Letter] ranging from B1 to IV1
- value : VAL_[+Letter] ranging from B2 to IV2

i.e.:
- in the calendar of SmithW, the date row is named "PER_A" and the value
row
"VAL_A"
- in the calendar of DoverG, the date row is named "PER_B" and the value
row
"VAL_B"

i would now like to sum all the values in these different worksheets
where a
date condition is met. so add all the values from SmithW and DoverG for
July-2007.

to do so, i used the following function :

=SUMIF(INDIRECT("PER_"&{"A";"B";"C";"D";"E";"F";"G ";"H";"I";"J";"K"});N3;INDIRECT("VAL_"&{"A";"B";"C ";"D";"E";"F";"G";"H";"I";"J";"K"}))

however, the only values that are returned are those from SmithW.

when i change the formula as follows:
=SUMIF(INDIRECT("PER_"&{"B"});N3;INDIRECT("EU_"&{" B"}))
the values of DoverG are returned correctly.

i use ";" because i use the european version of excel 2003. when i use
","
an error is returned. i also tried changing the "{}" brackets into "()",
but
that didn't work either.

questions:
- how does the indirect function work?
- is it possible to add 'wildcards' to the function in order to reduce
its
size. for example : =SUMIF(INDIRECT("PER_"&{*});N3;INDIRECT("EU_"&{*}) )
where * is the wildcard

thanks for helping.
andy




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
Indirect Function Jim May Excel Worksheet Functions 10 November 12th 06 07:29 PM
Need help on Indirect function Naveen Excel Discussion (Misc queries) 3 August 11th 06 06:45 PM
indirect function? Russ Excel Worksheet Functions 6 July 30th 05 06:42 PM
INDIRECT function Paul K. Excel Worksheet Functions 0 February 10th 05 09:53 PM
Indirect Function and Sum gr Excel Worksheet Functions 2 February 2nd 05 04:16 PM


All times are GMT +1. The time now is 04:11 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"