Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Match name and Date Period for %

In sheet 1
Name Date %
u 31-Mar-07 3.00%
P 30-Mar-07 1.20%
w 06-May-07 4.50%
w 10-Jun-07 #N/A


In Sheet 2
Name % Start End
p 1.2% 01-Jan-07 31-Mar-07
u 3.0% 09-Feb-07 06-May-07
w 4.5% 06-May-07 08-Jun-07

=INDEX(Sheet2!$B$2:$B$4,MATCH(1,(A1=Sheet2!$A$2:$A $4)*(B1=Sheet2!$C$2:$C$4)*(B1<=Sheet2!$D$2:$D$4), 0))

It is found that if the date specified is out of the range of Sheet 2, we
got the result "#N/A". How could I change it to zero instead of "#N/A" for
my further calculation.

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Match name and Date Period for %

Try:-

IF(ISERROR(INDEX(Sheet2!$B$2:$B$4,MATCH(1,(A2=Shee t2!$A$2:$A$4)*(B2=Sheet2!$C$2:$C$4)*(B2<=Sheet2!$ D$2:$D$4),0))),"0",INDEX(Sheet2!$B$2:$B$4,MATCH(1, (A2=Sheet2!$A$2:$A$4)*(B2=Sheet2!$C$2:$C$4)*(B2<= Sheet2!$D$2:$D$4),0)))

Mike

"aggregate sum over the periods" wrote:

In sheet 1
Name Date %
u 31-Mar-07 3.00%
P 30-Mar-07 1.20%
w 06-May-07 4.50%
w 10-Jun-07 #N/A


In Sheet 2
Name % Start End
p 1.2% 01-Jan-07 31-Mar-07
u 3.0% 09-Feb-07 06-May-07
w 4.5% 06-May-07 08-Jun-07

=INDEX(Sheet2!$B$2:$B$4,MATCH(1,(A1=Sheet2!$A$2:$A $4)*(B1=Sheet2!$C$2:$C$4)*(B1<=Sheet2!$D$2:$D$4), 0))

It is found that if the date specified is out of the range of Sheet 2, we
got the result "#N/A". How could I change it to zero instead of "#N/A" for
my further calculation.

Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Match name and Date Period for %

Thanks. I got the result .

"Mike H" wrote:

Try:-

IF(ISERROR(INDEX(Sheet2!$B$2:$B$4,MATCH(1,(A2=Shee t2!$A$2:$A$4)*(B2=Sheet2!$C$2:$C$4)*(B2<=Sheet2!$ D$2:$D$4),0))),"0",INDEX(Sheet2!$B$2:$B$4,MATCH(1, (A2=Sheet2!$A$2:$A$4)*(B2=Sheet2!$C$2:$C$4)*(B2<= Sheet2!$D$2:$D$4),0)))

Mike

"aggregate sum over the periods" wrote:

In sheet 1
Name Date %
u 31-Mar-07 3.00%
P 30-Mar-07 1.20%
w 06-May-07 4.50%
w 10-Jun-07 #N/A


In Sheet 2
Name % Start End
p 1.2% 01-Jan-07 31-Mar-07
u 3.0% 09-Feb-07 06-May-07
w 4.5% 06-May-07 08-Jun-07

=INDEX(Sheet2!$B$2:$B$4,MATCH(1,(A1=Sheet2!$A$2:$A $4)*(B1=Sheet2!$C$2:$C$4)*(B1<=Sheet2!$D$2:$D$4), 0))

It is found that if the date specified is out of the range of Sheet 2, we
got the result "#N/A". How could I change it to zero instead of "#N/A" for
my further calculation.

Thanks in advance

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
How can I match a calculated date to closest date from a list? David P Excel Worksheet Functions 2 January 22nd 07 12:05 PM
Sum column based on value in each row, if two cells equal, or if date is within time period [email protected] Excel Worksheet Functions 8 September 25th 06 02:40 PM
Every time i put a number with period it becomes a date and time excelSOS Excel Discussion (Misc queries) 7 March 7th 06 12:20 AM
Period to Period percentage change? cs120 Excel Discussion (Misc queries) 1 September 18th 05 12:05 PM
Calculating recurring date in following month, calculating # days in that period Walterius Excel Worksheet Functions 6 June 4th 05 11:21 PM


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