Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default SUMPRODUCT & INDIRECT?

Hi

I am getting steadily to grips with excel's more interesting
functions, but am definitely no expert!

I have a spreadsheet with the following ranges:

Sheet 1 - Absence Summary.
Sheet 2 - Formula Data Sheet (Hidden from view)
Sheets 3-75 - Individual employee absence sheets titled '"Surname",
"Initial"'

I have the following named ranges:
Absence_Date: Workbook level named range.
One_year_ago: Workbook level.
Absence_Code: Worksheet level.
Workdays_since_start_date: Worksheet level
Workdays_in_last_year:Worksheet level

The following ranges are used (e.g.)
Absence Summary B9 = (Text) Surname
Absence Summary C9 = (Text) Initial
Absence Summary E9 = (Date) Start Date

I have entered the following formula into Absence Summary F9:
=(SUMPRODUCT(--
(ABSENCE_DATE=(DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY()))))*(--
(ABSENCE_DATE<=(TODAY())))*(INDIRECT("'"&$B9&", "&$C9&"'!
Absence_Code"={"A","U","S","US"}))))/workdays_in_last_year

What I wanted it to do is to look up the sheet titled "Surname",
"Initial", and count all cells that contain either an "a", "u", "s",
or "us" in the named range "Absence_Code" between one year ago and
today, then divide that number by the number of workdays in the last
year specified in the formula data sheet in named range
"Workdays_in_last_year".

I get the result "Ref" so I am obviously doing something wrong.

Can anyone help?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMPRODUCT & INDIRECT?

The problem is in INDIRECT. The syntax is incorrect.

(INDIRECT("'"&$B9&", "&$C9&"'!Absence_Code"={"A","U","S","US"}))

Try it like this:

(INDIRECT("'"&$B9&", "&$C9&"'!Absence_Code")={"A","U","S","US"})

Is the named range Absence_Code a *static* range or is it dynamic? INDIRECT
has problems with dynamic ranges.

Also, you should use the same operator throughout the entire formula. You
have both "--" and "*". You also have some extra ( ) that aren't needed.

Here it is cleaned up:

=SUMPRODUCT((ABSENCE_DATE=DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())))*(
ABSENCE_DATE<=TODAY())*(INDIRECT("'"&$B9&",
"&$C9&"'!Absence_Code")={"A","U","S","US"}))/workdays_in_last_year

I didn't test all the date stuff but I did test the INDIRECT stuff!

--
Biff
Microsoft Excel MVP


"lou031205" wrote in message
ups.com...
Hi

I am getting steadily to grips with excel's more interesting
functions, but am definitely no expert!

I have a spreadsheet with the following ranges:

Sheet 1 - Absence Summary.
Sheet 2 - Formula Data Sheet (Hidden from view)
Sheets 3-75 - Individual employee absence sheets titled '"Surname",
"Initial"'

I have the following named ranges:
Absence_Date: Workbook level named range.
One_year_ago: Workbook level.
Absence_Code: Worksheet level.
Workdays_since_start_date: Worksheet level
Workdays_in_last_year:Worksheet level

The following ranges are used (e.g.)
Absence Summary B9 = (Text) Surname
Absence Summary C9 = (Text) Initial
Absence Summary E9 = (Date) Start Date

I have entered the following formula into Absence Summary F9:
=(SUMPRODUCT(--
(ABSENCE_DATE=(DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY()))))*(--
(ABSENCE_DATE<=(TODAY())))*(INDIRECT("'"&$B9&", "&$C9&"'!
Absence_Code"={"A","U","S","US"}))))/workdays_in_last_year

What I wanted it to do is to look up the sheet titled "Surname",
"Initial", and count all cells that contain either an "a", "u", "s",
or "us" in the named range "Absence_Code" between one year ago and
today, then divide that number by the number of workdays in the last
year specified in the formula data sheet in named range
"Workdays_in_last_year".

I get the result "Ref" so I am obviously doing something wrong.

Can anyone help?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMPRODUCT & INDIRECT?

I did test the INDIRECT stuff!

Based on a *static* range.

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
The problem is in INDIRECT. The syntax is incorrect.

(INDIRECT("'"&$B9&", "&$C9&"'!Absence_Code"={"A","U","S","US"}))

Try it like this:

(INDIRECT("'"&$B9&", "&$C9&"'!Absence_Code")={"A","U","S","US"})

Is the named range Absence_Code a *static* range or is it dynamic?
INDIRECT has problems with dynamic ranges.

Also, you should use the same operator throughout the entire formula. You
have both "--" and "*". You also have some extra ( ) that aren't needed.

Here it is cleaned up:

=SUMPRODUCT((ABSENCE_DATE=DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())))*(
ABSENCE_DATE<=TODAY())*(INDIRECT("'"&$B9&",
"&$C9&"'!Absence_Code")={"A","U","S","US"}))/workdays_in_last_year

I didn't test all the date stuff but I did test the INDIRECT stuff!

--
Biff
Microsoft Excel MVP


"lou031205" wrote in message
ups.com...
Hi

I am getting steadily to grips with excel's more interesting
functions, but am definitely no expert!

I have a spreadsheet with the following ranges:

Sheet 1 - Absence Summary.
Sheet 2 - Formula Data Sheet (Hidden from view)
Sheets 3-75 - Individual employee absence sheets titled '"Surname",
"Initial"'

I have the following named ranges:
Absence_Date: Workbook level named range.
One_year_ago: Workbook level.
Absence_Code: Worksheet level.
Workdays_since_start_date: Worksheet level
Workdays_in_last_year:Worksheet level

The following ranges are used (e.g.)
Absence Summary B9 = (Text) Surname
Absence Summary C9 = (Text) Initial
Absence Summary E9 = (Date) Start Date

I have entered the following formula into Absence Summary F9:
=(SUMPRODUCT(--
(ABSENCE_DATE=(DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY()))))*(--
(ABSENCE_DATE<=(TODAY())))*(INDIRECT("'"&$B9&", "&$C9&"'!
Absence_Code"={"A","U","S","US"}))))/workdays_in_last_year

What I wanted it to do is to look up the sheet titled "Surname",
"Initial", and count all cells that contain either an "a", "u", "s",
or "us" in the named range "Absence_Code" between one year ago and
today, then divide that number by the number of workdays in the last
year specified in the formula data sheet in named range
"Workdays_in_last_year".

I get the result "Ref" so I am obviously doing something wrong.

Can anyone help?





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default SUMPRODUCT & INDIRECT?

Thank you - works really well now!

On Nov 3, 7:01 pm, "T. Valko" wrote:
I did test the INDIRECT stuff!


Based on a *static* range.

--
Biff
Microsoft Excel MVP

"T. Valko" wrote in message

...

The problem is in INDIRECT. The syntax is incorrect.


(INDIRECT("'"&$B9&", "&$C9&"'!Absence_Code"={"A","U","S","US"}))


Try it like this:


(INDIRECT("'"&$B9&", "&$C9&"'!Absence_Code")={"A","U","S","US"})


Is the named range Absence_Code a *static* range or is it dynamic?
INDIRECT has problems with dynamic ranges.


Also, you should use the same operator throughout the entire formula. You
have both "--" and "*". You also have some extra ( ) that aren't needed.


Here it is cleaned up:


=SUMPRODUCT((ABSENCE_DATE=DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())))*(
ABSENCE_DATE<=TODAY())*(INDIRECT("'"&$B9&",
"&$C9&"'!Absence_Code")={"A","U","S","US"}))/workdays_in_last_year


I didn't test all the date stuff but I did test the INDIRECT stuff!


--
Biff
Microsoft Excel MVP


"lou031205" wrote in message
oups.com...
Hi


I am getting steadily to grips with excel's more interesting
functions, but am definitely no expert!


I have a spreadsheet with the following ranges:


Sheet 1 - Absence Summary.
Sheet 2 - Formula Data Sheet (Hidden from view)
Sheets 3-75 - Individual employee absence sheets titled '"Surname",
"Initial"'


I have the following named ranges:
Absence_Date: Workbook level named range.
One_year_ago: Workbook level.
Absence_Code: Worksheet level.
Workdays_since_start_date: Worksheet level
Workdays_in_last_year:Worksheet level


The following ranges are used (e.g.)
Absence Summary B9 = (Text) Surname
Absence Summary C9 = (Text) Initial
Absence Summary E9 = (Date) Start Date


I have entered the following formula into Absence Summary F9:
=(SUMPRODUCT(--
(ABSENCE_DATE=(DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY()))))*(--
(ABSENCE_DATE<=(TODAY())))*(INDIRECT("'"&$B9&", "&$C9&"'!
Absence_Code"={"A","U","S","US"}))))/workdays_in_last_year


What I wanted it to do is to look up the sheet titled "Surname",
"Initial", and count all cells that contain either an "a", "u", "s",
or "us" in the named range "Absence_Code" between one year ago and
today, then divide that number by the number of workdays in the last
year specified in the formula data sheet in named range
"Workdays_in_last_year".


I get the result "Ref" so I am obviously doing something wrong.


Can anyone help?




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMPRODUCT & INDIRECT?

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"lou031205" wrote in message
ups.com...
Thank you - works really well now!

On Nov 3, 7:01 pm, "T. Valko" wrote:
I did test the INDIRECT stuff!


Based on a *static* range.

--
Biff
Microsoft Excel MVP

"T. Valko" wrote in message

...

The problem is in INDIRECT. The syntax is incorrect.


(INDIRECT("'"&$B9&", "&$C9&"'!Absence_Code"={"A","U","S","US"}))


Try it like this:


(INDIRECT("'"&$B9&", "&$C9&"'!Absence_Code")={"A","U","S","US"})


Is the named range Absence_Code a *static* range or is it dynamic?
INDIRECT has problems with dynamic ranges.


Also, you should use the same operator throughout the entire formula.
You
have both "--" and "*". You also have some extra ( ) that aren't
needed.


Here it is cleaned up:


=SUMPRODUCT((ABSENCE_DATE=DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())))*(
ABSENCE_DATE<=TODAY())*(INDIRECT("'"&$B9&",
"&$C9&"'!Absence_Code")={"A","U","S","US"}))/workdays_in_last_year


I didn't test all the date stuff but I did test the INDIRECT stuff!


--
Biff
Microsoft Excel MVP


"lou031205" wrote in message
oups.com...
Hi


I am getting steadily to grips with excel's more interesting
functions, but am definitely no expert!


I have a spreadsheet with the following ranges:


Sheet 1 - Absence Summary.
Sheet 2 - Formula Data Sheet (Hidden from view)
Sheets 3-75 - Individual employee absence sheets titled '"Surname",
"Initial"'


I have the following named ranges:
Absence_Date: Workbook level named range.
One_year_ago: Workbook level.
Absence_Code: Worksheet level.
Workdays_since_start_date: Worksheet level
Workdays_in_last_year:Worksheet level


The following ranges are used (e.g.)
Absence Summary B9 = (Text) Surname
Absence Summary C9 = (Text) Initial
Absence Summary E9 = (Date) Start Date


I have entered the following formula into Absence Summary F9:
=(SUMPRODUCT(--
(ABSENCE_DATE=(DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY()))))*(--
(ABSENCE_DATE<=(TODAY())))*(INDIRECT("'"&$B9&", "&$C9&"'!
Absence_Code"={"A","U","S","US"}))))/workdays_in_last_year


What I wanted it to do is to look up the sheet titled "Surname",
"Initial", and count all cells that contain either an "a", "u", "s",
or "us" in the named range "Absence_Code" between one year ago and
today, then divide that number by the number of workdays in the last
year specified in the formula data sheet in named range
"Workdays_in_last_year".


I get the result "Ref" so I am obviously doing something wrong.


Can anyone help?






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
Problem with using INDIRECT with SUMPRODUCT and ROW() JB99 Excel Worksheet Functions 11 November 3rd 07 05:49 PM
Need help with using SUMPRODUCT with INDIRECT anara Excel Worksheet Functions 1 January 22nd 06 05:08 PM
Help with Sumproduct with Indirect Rob Excel Worksheet Functions 6 July 28th 05 09:03 PM
sumproduct & indirect floridasurfn Excel Worksheet Functions 3 March 14th 05 02:01 AM
Indirect range in SUMPRODUCT? BobT Excel Discussion (Misc queries) 2 February 16th 05 08:51 PM


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

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

About Us

"It's about Microsoft Excel"