Quantcast
Channel: Active questions tagged worksheet-function - Super User
Viewing all articles
Browse latest Browse all 988

Formula for Matching Header to Value

$
0
0

This is a question that I may have difficulty explaining, so bear with me.

On one sheet I have a column which has several cells, some of which are blank, some that have a single value, and some that have more than one value. On another sheet I have a list of those values with an appropriate home. Here’s an example of what I’m working with:

Sheet1:

C1: Team NamesC2: crimson-tide, bulldogsC3: bulldogsC4: (blank)C5: canucks

Sheet2:

A1: Football          B1: Basketball        C1: HockeyA2: crimson-tide      B2: celtics           C2: maple-leafsA3: bulldogs          B3: mavericks         C3: oilersA4: tigers            B4: gonzaga-bulldogs  C4: canucksA5: longhorns         B5: warriors          C5: bruins

Expected Output on Sheet1:

D2: FootballD3: FootballD4: No Sport FoundD5: Hockey

Actual Output:

D2: (blank)D3: FootballBasketBallD4: (blank)D5: Hockey

I am wanting to iterate through Sheet1!C2:C5 and any value that has a match on Sheet2!A2:C5 will display the appropriate header from Sheet2!A1:C1. For example, Sheet1!C2 would say ‘Football’ since either crimson-tide or bulldogs is under the football header on Sheet2!A1.

What may or may not be important to add: no values in Sheet1!C will have a team that will be in another header. Crimson-tide will only be under the football header on Sheet2, not both the football and basketball header, for example. So far I’ve only been able to show a True/False result if the team in Column C matches a team on Sheet2. I cannot figure out how to display the appropriate header. Please help!


Viewing all articles
Browse latest Browse all 988

Trending Articles