#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 78
Default Index Problem

I am working on a spreadsheet (excel 2002) showing work schedules (A or P).
On the first sheet I have:
17-Feb 18-Feb 19-Feb 20-Feb
Sue RN a a a
Mary RN p p p
Betty RN a a a
Peter RN p p p
Paul RN a a a
Liz RN p p p

On sheet 2 I want to list those working the A shift by day so it should show:

17-Feb 18-Feb 19-Feb 20-Feb
Sue Sue Sue Betty
Paul Betty Betty Paul
Paul

I am using the following formula
A2:=IF(ROWS($1:1)COUNTIF(Sheet1!$C$2:$C$7,"a"),"" ,INDEX(Sheet1!$A$2:$A$7,SMALL(IF((Sheet1!$C$2:$C$7 ="a"), ROW(Sheet1!$C$2:$C$7)),ROWS($1:1))))

This formula is copied down the columns.
A2 result is "Mary"
A3 is #NUM

Can anyone tell me what I'm doing wrong? Thanks ahead of time.

Tracey


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Index Problem

Try it like this:

=IF(..................,ROW(C$2:C$7)-MIN(ROW(C$2:C$7))+1),..........)

--
Biff
Microsoft Excel MVP


"Tracey" wrote in message
...
I am working on a spreadsheet (excel 2002) showing work schedules (A or P).
On the first sheet I have:
17-Feb 18-Feb 19-Feb 20-Feb
Sue RN a a a
Mary RN p p p
Betty RN a a a
Peter RN p p p
Paul RN a a a
Liz RN p p p

On sheet 2 I want to list those working the A shift by day so it should
show:

17-Feb 18-Feb 19-Feb 20-Feb
Sue Sue Sue Betty
Paul Betty Betty Paul
Paul

I am using the following formula
A2:=IF(ROWS($1:1)COUNTIF(Sheet1!$C$2:$C$7,"a"),"" ,INDEX(Sheet1!$A$2:$A$7,SMALL(IF((Sheet1!$C$2:$C$7 ="a"),
ROW(Sheet1!$C$2:$C$7)),ROWS($1:1))))

This formula is copied down the columns.
A2 result is "Mary"
A3 is #NUM

Can anyone tell me what I'm doing wrong? Thanks ahead of time.

Tracey




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Index Problem

P.S.

Don't forget to enter as an array.

Array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try it like this:

=IF(..................,ROW(C$2:C$7)-MIN(ROW(C$2:C$7))+1),..........)

--
Biff
Microsoft Excel MVP


"Tracey" wrote in message
...
I am working on a spreadsheet (excel 2002) showing work schedules (A or
P).
On the first sheet I have:
17-Feb 18-Feb 19-Feb 20-Feb
Sue RN a a a
Mary RN p p p
Betty RN a a a
Peter RN p p p
Paul RN a a a
Liz RN p p p

On sheet 2 I want to list those working the A shift by day so it should
show:

17-Feb 18-Feb 19-Feb 20-Feb
Sue Sue Sue Betty
Paul Betty Betty Paul
Paul

I am using the following formula
A2:=IF(ROWS($1:1)COUNTIF(Sheet1!$C$2:$C$7,"a"),"" ,INDEX(Sheet1!$A$2:$A$7,SMALL(IF((Sheet1!$C$2:$C$7 ="a"),
ROW(Sheet1!$C$2:$C$7)),ROWS($1:1))))

This formula is copied down the columns.
A2 result is "Mary"
A3 is #NUM

Can anyone tell me what I'm doing wrong? Thanks ahead of time.

Tracey






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 78
Default Index Problem

Thanks, Did just what I wanted.

Thanks Again....

"T. Valko" wrote:

Try it like this:

=IF(..................,ROW(C$2:C$7)-MIN(ROW(C$2:C$7))+1),..........)

--
Biff
Microsoft Excel MVP


"Tracey" wrote in message
...
I am working on a spreadsheet (excel 2002) showing work schedules (A or P).
On the first sheet I have:
17-Feb 18-Feb 19-Feb 20-Feb
Sue RN a a a
Mary RN p p p
Betty RN a a a
Peter RN p p p
Paul RN a a a
Liz RN p p p

On sheet 2 I want to list those working the A shift by day so it should
show:

17-Feb 18-Feb 19-Feb 20-Feb
Sue Sue Sue Betty
Paul Betty Betty Paul
Paul

I am using the following formula
A2:=IF(ROWS($1:1)COUNTIF(Sheet1!$C$2:$C$7,"a"),"" ,INDEX(Sheet1!$A$2:$A$7,SMALL(IF((Sheet1!$C$2:$C$7 ="a"),
ROW(Sheet1!$C$2:$C$7)),ROWS($1:1))))

This formula is copied down the columns.
A2 result is "Mary"
A3 is #NUM

Can anyone tell me what I'm doing wrong? Thanks ahead of time.

Tracey





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Index Problem

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Tracey" wrote in message
...
Thanks, Did just what I wanted.

Thanks Again....

"T. Valko" wrote:

Try it like this:

=IF(..................,ROW(C$2:C$7)-MIN(ROW(C$2:C$7))+1),..........)

--
Biff
Microsoft Excel MVP


"Tracey" wrote in message
...
I am working on a spreadsheet (excel 2002) showing work schedules (A or
P).
On the first sheet I have:
17-Feb 18-Feb 19-Feb 20-Feb
Sue RN a a a
Mary RN p p p
Betty RN a a a
Peter RN p p p
Paul RN a a a
Liz RN p p p

On sheet 2 I want to list those working the A shift by day so it should
show:

17-Feb 18-Feb 19-Feb 20-Feb
Sue Sue Sue Betty
Paul Betty Betty Paul
Paul

I am using the following formula
A2:=IF(ROWS($1:1)COUNTIF(Sheet1!$C$2:$C$7,"a"),"" ,INDEX(Sheet1!$A$2:$A$7,SMALL(IF((Sheet1!$C$2:$C$7 ="a"),
ROW(Sheet1!$C$2:$C$7)),ROWS($1:1))))

This formula is copied down the columns.
A2 result is "Mary"
A3 is #NUM

Can anyone tell me what I'm doing wrong? Thanks ahead of time.

Tracey









  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 78
Default Index Problem



"Tracey" wrote:

I am working on a spreadsheet (excel 2002) showing work schedules (A or P).
On the first sheet I have:
17-Feb 18-Feb 19-Feb 20-Feb
Sue RN a a a
Mary RN p p p
Betty RN a a a
Peter RN p p p
Paul RN a a a
Liz RN p p p

On sheet 2 I want to list those working the A shift by day so it should show:

17-Feb 18-Feb 19-Feb 20-Feb
Sue Sue Sue Betty
Paul Betty Betty Paul
Paul

I am using the following formula
A2:=IF(ROWS($1:1)COUNTIF(Sheet1!$C$2:$C$7,"a"),"" ,INDEX(Sheet1!$A$2:$A$7,SMALL(IF((Sheet1!$C$2:$C$7 ="a"), ROW(Sheet1!$C$2:$C$7)),ROWS($1:1))))

This formula is copied down the columns.
A2 result is "Mary"
A3 is #NUM

Can anyone tell me what I'm doing wrong? Thanks ahead of time.

Tracey


I thought I found the error in that I had not calculated as an array (ctlr -
alt - enter) but when I did so I got

17-Feb
Mary
Liz

So it looks like for some reason it is selecting the index below the one it
should be selecting. What am I doing wrong now? Thanks for your help and
expertise.

Tracey
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
=Index Problem Nikki Excel Discussion (Misc queries) 5 September 30th 07 11:18 PM
Problem with INDEX formula Sasikiran Excel Discussion (Misc queries) 3 September 27th 07 05:59 PM
Index formula problem billyho Excel Worksheet Functions 4 August 14th 07 07:44 PM
INDEX PROBLEM...I THINK Steve Excel Worksheet Functions 15 February 20th 07 09:28 PM
INDEX problem malik641 Excel Worksheet Functions 7 July 7th 05 01:50 PM


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