Searching Columns A and B for Specific Values and Returning '1' in Column C if 'True'

Tomasome

New Member
Joined
Jan 25, 2015
Messages
2
Hi all, long time lurker, first time poster. Thanking you in advance.

I am attempting to do some analysis on calls into a call center and I have a large spreadsheet that contains a call category and call description. Essentially, what I want to do is search column A for 'Category X' and subsequently search the corresponding call description in Column B for a specific code. Then, if there is a match, I want to put the value '1' for a match in column C and '0' if not found.

Lets say column A contains three categories: i.e. Operations, Claims, Sales.
Lets say column B contains any random string of text: i.e. string of text is for code 0000, string of text is for code 0000, string of text is for the code 1111

So, say I want to search all the text in column B for the code '0000' where the category in column A is 'Operations' and subsequently put the value 1 in the corresponding cell in column C.

How would I go about doing this?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
The above will show 0 if not found and 1 if found once, 2 if twice etc.
Below will show 0 if not found, 1 if found regardless of number of uccurances.
=IF(SUMPRODUCT((A1:A100="Category X")*(B1:B100="Code 1111"))>=1,1,0)
 
Upvote 0
The above will show 0 if not found and 1 if found once, 2 if twice etc.
Below will show 0 if not found, 1 if found regardless of number of uccurances.
=IF(SUMPRODUCT((A1:A100="Category X")*(B1:B100="Code 1111"))>=1,1,0)

Many thanks Gaz but this actually didn't work at all. I have found another two formulas that do the trick;

1. =AND(A2="Operations",ISNUMBER(SEARCH("0000",B2)))*1

2. =SUMPRODUCT((A2="Operations")*(RIGHT(B2,4)="0000"))
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,559
Members
449,089
Latest member
Motoracer88

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