Need a "Find Next" Formula

M

Matt

I am creating a schedule spreadsheet with sheets for everyday of the week and
the shifts. On the sheet listed “Day†I have Names in column A, Sections in
column B (ex would be W, E, HLS). On the sheet “Monday†in column A is a list
of sections (ex is W,W and E,E). I need to have the various names listed by
the assigned areas.

Before After Forumla
Sheet Day Sheet Monday Sheet Monday
Col A Col B Col A Col B Col A Col B
Jon W W W Jon
Pam E W W Tom
Tom W E E Pam
Nick E E E Nick

I could use the following formula in Monday B1 but it would return the same
name in B2.
=IF(ISNA(MATCH(A1,Day!$B$1:$B$4,FALSE)),"",INDEX(Day!$A$1:$A$4,MATCH(A1,Day!$B$1:$B$4,0)))
Can I nest a Row formula +1?
 
M

Max

One simple set up to get you there w/o fuss
Data is assumed in row 1 down in sheets: Day & Monday

In Monday,
You have the lookup values listed in A1 down as posted
In B1: =IF(A1="","",A1&COUNTIF($A$1:A1,A1))
In C1: =IF(Day!B1="","",Day!B1&COUNTIF(Day!$B$1:B1,Day!B1))
In D1: =IF(A1="","",INDEX(Day!A:A,MATCH(B1,C:C,0)))
Select B1:C1, copy down to D4. Minimize/hide away cols B & C. Col D will
return the required results.
 
H

Héctor Miguel

hi, Matt !

other option is an [CSE] array-entered formula in monday sheet [B1] and copy-down:
=index(day!a:a,small(if(day!$b$1:$b$4=a1,row(day!$b$1:$b$4)),countif($a$1:a1,a1)))

hth,
hector.
 
M

Matt

Thanx for the quick response guys.
Max’s solution returns a 0 if one of the cells in Day Col B is empty and
Hector’s returns #NUM!. There will be days when an employee is off and I want
the cell on Monday's sheet to remain blank. I have tried to elevate this but
cannot, do anyone have a solutions.
 
M

Max

In Monday,
In D1: =IF(A1="","",INDEX(Day!A:A,MATCH(B1,C:C,0)))

Try this alternative instead in D1, copied down:
=IF(A1="","",IF(ISNA(INDEX(Day!A:A,MATCH(B1,C:C,0))),"",INDEX(Day!A:A,MATCH(B1,C:C,0))))

Above seems to drive out the results that you seek

---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

IF cell does not contain certain value move to right 2
Need some help 2
League table 3
Text and Numeric lookup 5
Help with formula 3
Transpose a data table 7
Index Formula Help 3
Find and average 2

Top