What if formula if one condition is met

pto160

Active Member
Joined
Feb 1, 2009
Messages
478
Office Version
  1. 365
Platform
  1. Windows
I have a credit card dispute report. I am trying to write a what if formula that if a certain condition is met then to fill in yes for all instances of the order number.
In this example, that if an order has a PRE-ARB, then to put in yes for all instances of the order number that has PRE-ARB. So order 100 has a PRE-ARB, then I want YES (has PRE-ARB) for order 100. Here is the data.

Book1
ABC
1OrderTYPEPRE-ARB?
2100DISPUTEYES
3200DISPUTENO
4100REVERSALYES
5300DISPUTENO
6100PRE-ARBYES
7500DISPUTENO
Sheet1
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Put this formula in cell C2 and copy down:
Excel Formula:
=IF(COUNTIFS(A:A,A2,B:B,"PRE-ARB")>0,"YES","NO")
 
Upvote 0
Try this:

Book1
ABC
1OrderTYPEPRE-ARB?
2100DISPUTEYES
3200DISPUTENO
4100REVERSALYES
5300DISPUTENO
6100PRE-ARBYES
7500DISPUTENO
Sheet1
Cell Formulas
RangeFormula
C2:C7C2=IF(COUNTIFS(A:A,A2,B:B,"PRE-ARB"),"YES","NO")
 
Upvote 0
This is exactly what I am looking for. Fantastic. Thank you so much to everyone. (y) :) This will really help me with my report.
 
Upvote 0
You are welcome.
Glad we were able to help!
 
Upvote 0

Forum statistics

Threads
1,215,107
Messages
6,123,126
Members
449,097
Latest member
mlckr

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