place text in row for all matching instances in range

saralouise

New Member
Joined
Oct 11, 2018
Messages
2
here's what I'm trying to accomplish:
if any of the same ID number in column B have Type 1 and Type 2 in column c, mark all rows associated with that same ID number with "priority" in column A

i have =IF(AND(B3=B4,C3<>C4),"PRIORITY","") in column A and have been trying to use it as a helper column, but i can't figure out how to check to see if the ID number in the row with "PRIORITY" is matched anywhere else in column B and then also place the text for all matching instances.

ABC
ID #Type
1Type 1
1Type 1
PRIORITY2Type 1
2Type 2
9Type 1
9Type 1
9Type 1
9Type 1
9Type 1
9Type 1
9Type 1
9Type 1
9Type 1
9Type 1
9Type 1
PRIORITY9Type 1
9Type 2
9Type 2
9Type 2
12Type 1
16Type 1
16Type 1
16Type 1
PRIORITY16Type 1
16Type 2
13Type 2
14Type 2
15Type 2

<colgroup><col style="mso-width-source:userset;mso-width-alt:3584;width:74pt" width="98"> <col style="mso-width-source:userset;mso-width-alt:3584;width:74pt" width="98"> <col style="mso-width-source:userset;mso-width-alt:3584;width:74pt" width="98"> </colgroup><tbody>
</tbody>

open to VBA or formula.

thank you!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Firesword

New Member
Joined
Oct 10, 2018
Messages
40
Office Version
  1. 2016
Platform
  1. Windows
Hi Saralouise, If I've understood your request then this should work
=IF(SUMIFS($B:$B,$B:$B,B3,$C:$C,"Type 1")>0,IF(SUMIFS($B:$B,$B:$B,B3,$C:$C,"Type 2")>0,"PRIORITY",""),"")
 

saralouise

New Member
Joined
Oct 11, 2018
Messages
2
yes, thank you!! so simply elegant that i hadn't occurred to me - i got down the rabbit hole of far more complicated solutions.
 

Forum statistics

Threads
1,136,258
Messages
5,674,670
Members
419,520
Latest member
Jennifer4Dillon

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
Top