Index Match Formula with multiple criteria

Trikson

Board Regular
Joined
Feb 10, 2014
Messages
61
Hi,

I'm trying to identify items that have two specific values (<blank> in Owner Name) spread across two rows (Owner Role="Primary Site Owner" OR "Secondary Site Owner") with one common identifier (Site URL) and, if the conditions are met, insert a note in the column of these row(s) (Owner status). I believe index match is my best shot, but am open to all other suggestions.

What the data looks like:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Site URL[/TD]
[TD]Owner Role[/TD]
[TD]Owner Name[/TD]
[TD]Owner Status[/TD]
[/TR]
[TR]
[TD]URL1[/TD]
[TD]Primary Site Owner[/TD]
[TD]Ted[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]URL1[/TD]
[TD]Secondary Site Owner[/TD]
[TD]Susan[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]URL2[/TD]
[TD]Primary Site Owner[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]URL3[/TD]
[TD]Primary Site Owner[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]URL3[/TD]
[TD]Secondary Site Owner[/TD]
[TD]John[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]URL2[/TD]
[TD]Secondary Site Owner[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]URL4[/TD]
[TD]Primary Site Owner[/TD]
[TD]Ted[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]URL4[/TD]
[TD]Secondary Site Owner[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]URL4[/TD]
[TD]Functional Site Owner[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

What I Need to achieve:

End state is I have a Pivot with count of all sites that have no Primary and Secondary Site Owners assigned (Owner Name for these Owner Roles are blank). The issue I encounter when trying to do that on the row data is that Pivot counts the cases when even one of the conditions is met (either Primary or Secondary Owner is blank) which skews the data. As you can see in the example, the URLs are all over the place, and also there are different owner roles in the raw data that I am not interested in for this Pivot (but am hesitant to delete as I need it for different pivot). That means however that I cannot just have the formula check the row below, as this will create bogus results.

Therefore I believe what I need to do is to come up with a formula that would check the Owner Name Value for the Owner Role of Primary Site Owner, and if it is blank, formula needs to search for row where the same site URL is listed for Owner Role of Secondary Site Owner and check for the value of Owner Name for that row. If it is also blank, it should insert "Owners Missing" text in the Owner Status column of both rows (the one with missing Primary Site Owner and the one with missing Secondary Site Owner) and move to the next site.

If the value of Secondary Site Owner is anything different than blank, the formula does not need to insert anything and can simply move to next site. Same if the Primary Site Owner value is not blank, formula does not need to check for the Secondary Site Owner value and can move to next site.

Appreciate any suggestions on how to tackle this one.

Thanks in advance,
Trikson

</blank>
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi,

Hopefully this will help:


Book1
ABCD
1Site URLOwner RoleOwner NameOwner Status
2URL1Primary Site OwnerTed 
3URL1Secondary Site OwnerSusan
4URL2Primary Site OwnerOwner Missing
5URL3Primary Site Owner
6URL3Secondary Site OwnerJohn
7URL2Secondary Site OwnerOwner Missing
8URL4Primary Site OwnerTed
9URL4Secondary Site Owner
10URL4Functional Site Owner
Sheet4
Cell Formulas
RangeFormula
D2=IF(SUMPRODUCT(($A$2:$A$10=A2)*(($B$2:$B$10="Primary Site Owner")+($B$2:$B$10="Secondary Site Owner"))*($C$2:$C$10<>""))>0,"","Owner Missing")
 
Upvote 0
1. Works like a charm
2. I have yet another formula to learn

Seriously though -thank you very much Aryatect!
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top