Categorize Text Based on Criteria

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
922
Office Version
  1. 365
Hi,

I have the following table:

Book1
CDEFGHIJK
4DateNotesCheck NotesCategoryText CheckText CategoryCategory
57/1/2022Sales comission paid to JHG fullySalesSales Refund ProcessSalesSales RefundSales Refund Process
68/1/2022Sales refund made to Michale 4487UYSales, RefundSales Refund ProcessRefundSales CancelSales Cancellation Process
79/1/2022Sales cancellation completed for John 1147POSales, CancelSales Cancellation ProcessCancelSales DoubleSales Double Duplicate Process
810/1/2022Journal entry completed for JH56664 DoubleSales PremiumSales Premium Reversal Process
911/1/2022Debit balance reversed on HG78787 PremiumSalesSales Refund Process
1012/1/2022Sales double comission canceledSales, Cancel, DoubleSales Double Duplicate Process
1112/1/2022Sales premium reversed on policy YU77878Sales, PremiumSales Premium Reversal Process
Sheet1
Cell Formulas
RangeFormula
E5:E11E5=TEXTJOIN(", ", TRUE, IF(COUNTIF(D5, "*"&$I$5:$I$9&"*"), $I$5:$I$9, ""))



Column D has the free form notes from the processor. I am trying to categorize these notes in certain category. First, I am narrowing it down by key words with a formula in column E. Next, in column F, I would like to categorize it based on the category in column K. Is there a way to use a formula to achieve this ? The correct result is in column F. Appreciate all the help.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi,

Use F1 formula, but you Must Keep J9:K9 values at the Bottom of your table.
Otherwise use G1 formula, then your J9:K9 values can be anywhere within your table.

Book3.xlsx
CDEFGHIJK
4DateNotesCheck NotesCategoryText CheckText CategoryCategory
51/7/2022Sales comission paid to JHG fullySalesSales Refund ProcessSales Refund ProcessSalesSales RefundSales Refund Process
61/8/2022Sales refund made to Michale 4487UYSales, RefundSales Refund ProcessSales Refund ProcessRefundSales CancelSales Cancellation Process
71/9/2022Sales cancellation completed for John 1147POSales, CancelSales Cancellation ProcessSales Cancellation ProcessCancelSales DoubleSales Double Duplicate Process
81/10/2022Journal entry completed for JH56664  DoubleSales PremiumSales Premium Reversal Process
91/11/2022Debit balance reversed on HG78787  PremiumSalesSales Refund Process
101/12/2022Sales double comission canceledSales, Cancel, DoubleSales Double Duplicate ProcessSales Double Duplicate Process
111/12/2022Sales premium reversed on policy YU77878Sales, PremiumSales Premium Reversal ProcessSales Premium Reversal Process
Sheet957
Cell Formulas
RangeFormula
F5:F11F5=IF(E5="","",LOOKUP(2,1/SEARCH(SUBSTITUTE(SUBSTITUTE(E5,",",""),"Cancel Double","Double"),J$5:J$9),K$5:K$9))
G5:G11G5=IF(E5="","",LOOKUP(2,1/SEARCH(SUBSTITUTE(SUBSTITUTE(E5&E5,",",""),"Cancel Double","Double"),J$5:J$9&J$5:J$9),K$5:K$9))
 
Upvote 0
Solution
You're welcome, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,384
Members
449,080
Latest member
Armadillos

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