Charachter Detection in the text and counting them

Dezom

New Member
Joined
Jul 21, 2020
Messages
21
Office Version
  1. 2016
Platform
  1. Windows
  2. Mobile
Hello Everyone.

In the following table I gave some example texts. For the "Correction Work" tasks, I need to find the number of the works which is written the same tasks without "Correction Work"
So for your better understanding I wrote manually what result should formula give us in the column C.
For example first correction work task,
"ABC Correction Work A45-HGHG Mirror edition" has one time ABC task which is in the row 12 as "ABC A45-HGHG Mirror edition" So formula should give the number for this correction task "1".




Charachter detection and counting formula.xlsx
ABC
1TasksConceptsWhat should formula give?
2ABC Correction Work A45-HGHG Mirror editionCorrection Work1
3ABC Correction Work A12-HGHG Suspension adjustmentCorrection Work1
4ABC A21-A546 Differensial adjustmentABC
5ABC Correction Work A32-HGH4 Signal adjustmentCorrection Work0
6ABC A65-A453 Chair adjustmentABC
7ABC 12F-4H89 Leather adjustmentABC
8ABC A12-HGHG Suspension adjustmentABC
9ABC Correction Work A21-A546 Differensial adjustmentCorrection Work1
10ABC A28-9834 Glass AdjustmentABC
11ABC Correction Work A65-HBKL Instrumental adjustmentCorrection Work1
12ABC A45-HGHG Mirror editionABC
13ABC Correction Work A21-JAXY Backskeleton adjustmentCorrection Work0
14ABC A65-HBKL Instrumental adjustmentABC
15ABC Correction Work 12F-4H89 Leather adjustmentCorrection Work1
16ABC Correction Work A28-9834 Glass AdjustmentCorrection Work0
17ABC Correction A25-4RTG Light adjustmentCorrection Work0
18ABC Correction Work A65-A453 Chair adjustmentCorrection Work1
Data
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Let's see if this is headed in the right direction. I do get two different answers to you.
1. For cell C16 why isn't it 1, counting A10?
2. In cell C17 I got 1 instead of 0 but that is because A17 does not have 'Correction Work' in it and you said
number of the works which is written the same tasks without "Correction Work"


20 09 06.xlsm
ABC
1TasksConceptsWhat should formula give?
2ABC Correction Work A45-HGHG Mirror editionCorrection Work1
3ABC Correction Work A12-HGHG Suspension adjustmentCorrection Work1
4ABC A21-A546 Differensial adjustmentABC 
5ABC Correction Work A32-HGH4 Signal adjustmentCorrection Work0
6ABC A65-A453 Chair adjustmentABC 
7ABC 12F-4H89 Leather adjustmentABC 
8ABC A12-HGHG Suspension adjustmentABC 
9ABC Correction Work A21-A546 Differensial adjustmentCorrection Work1
10ABC A28-9834 Glass AdjustmentABC 
11ABC Correction Work A65-HBKL Instrumental adjustmentCorrection Work1
12ABC A45-HGHG Mirror editionABC 
13ABC Correction Work A21-JAXY Backskeleton adjustmentCorrection Work0
14ABC A65-HBKL Instrumental adjustmentABC 
15ABC Correction Work 12F-4H89 Leather adjustmentCorrection Work1
16ABC Correction Work A28-9834 Glass AdjustmentCorrection Work1
17ABC Correction A25-4RTG Light adjustmentCorrection Work1
18ABC Correction Work A65-A453 Chair adjustmentCorrection Work1
Sheet2 (2)
Cell Formulas
RangeFormula
C2:C18C2=IF(B2="Correction Work",COUNTIF(A$2:A$18,TRIM(SUBSTITUTE(A2,"Correction Work",""))),"")
 
Upvote 0
Hi Try This

Book1
ABCD
1TasksConceptsWhat should formula give?Formula
2ABC Correction Work A45-HGHG Mirror editionCorrection Work11
3ABC Correction Work A12-HGHG Suspension adjustmentCorrection Work11
4ABC A21-A546 Differensial adjustmentABC0
5ABC Correction Work A32-HGH4 Signal adjustmentCorrection Work00
6ABC A65-A453 Chair adjustmentABC0
7ABC 12F-4H89 Leather adjustmentABC0
8ABC A12-HGHG Suspension adjustmentABC0
9ABC Correction Work A21-A546 Differensial adjustmentCorrection Work11
10ABC A28-9834 Glass AdjustmentABC0
11ABC Correction Work A65-HBKL Instrumental adjustmentCorrection Work11
12ABC A45-HGHG Mirror editionABC0
13ABC Correction Work A21-JAXY Backskeleton adjustmentCorrection Work00
14ABC A65-HBKL Instrumental adjustmentABC0
15ABC Correction Work 12F-4H89 Leather adjustmentCorrection Work11
16ABC Correction Work A28-9834 Glass AdjustmentCorrection Work01
17ABC Correction A25-4RTG Light adjustmentCorrection Work00
18ABC Correction Work A65-A453 Chair adjustmentCorrection Work11
Sheet1
Cell Formulas
RangeFormula
D2:D18D2=SUM(IFERROR(SEARCH("ABC "&MID(SUBSTITUTE(A2,"ABC Correction Work ",""),1,SEARCH(" ",SUBSTITUTE(A2,"ABC Correction Work ",""))),$A$2:$A$18)^0,0))


It has some Condition
1. Work Id such as A45-HGHG should alway start with ABC in case of No correction work
 
Upvote 0
Let's see if this is headed in the right direction. I do get two different answers to you.
1. For cell C16 why isn't it 1, counting A10?
2. In cell C17 I got 1 instead of 0 but that is because A17 does not have 'Correction Work' in it and you said



20 09 06.xlsm
ABC
1TasksConceptsWhat should formula give?
2ABC Correction Work A45-HGHG Mirror editionCorrection Work1
3ABC Correction Work A12-HGHG Suspension adjustmentCorrection Work1
4ABC A21-A546 Differensial adjustmentABC 
5ABC Correction Work A32-HGH4 Signal adjustmentCorrection Work0
6ABC A65-A453 Chair adjustmentABC 
7ABC 12F-4H89 Leather adjustmentABC 
8ABC A12-HGHG Suspension adjustmentABC 
9ABC Correction Work A21-A546 Differensial adjustmentCorrection Work1
10ABC A28-9834 Glass AdjustmentABC 
11ABC Correction Work A65-HBKL Instrumental adjustmentCorrection Work1
12ABC A45-HGHG Mirror editionABC 
13ABC Correction Work A21-JAXY Backskeleton adjustmentCorrection Work0
14ABC A65-HBKL Instrumental adjustmentABC 
15ABC Correction Work 12F-4H89 Leather adjustmentCorrection Work1
16ABC Correction Work A28-9834 Glass AdjustmentCorrection Work1
17ABC Correction A25-4RTG Light adjustmentCorrection Work1
18ABC Correction Work A65-A453 Chair adjustmentCorrection Work1
Sheet2 (2)
Cell Formulas
RangeFormula
C2:C18C2=IF(B2="Correction Work",COUNTIF(A$2:A$18,TRIM(SUBSTITUTE(A2,"Correction Work",""))),"")

Hi Peter thats perfectly working thanks. For those two points you mentioned. You are right I did manual mistakes. Thanks
 
Upvote 0
Hi Try This

Book1
ABCD
1TasksConceptsWhat should formula give?Formula
2ABC Correction Work A45-HGHG Mirror editionCorrection Work11
3ABC Correction Work A12-HGHG Suspension adjustmentCorrection Work11
4ABC A21-A546 Differensial adjustmentABC0
5ABC Correction Work A32-HGH4 Signal adjustmentCorrection Work00
6ABC A65-A453 Chair adjustmentABC0
7ABC 12F-4H89 Leather adjustmentABC0
8ABC A12-HGHG Suspension adjustmentABC0
9ABC Correction Work A21-A546 Differensial adjustmentCorrection Work11
10ABC A28-9834 Glass AdjustmentABC0
11ABC Correction Work A65-HBKL Instrumental adjustmentCorrection Work11
12ABC A45-HGHG Mirror editionABC0
13ABC Correction Work A21-JAXY Backskeleton adjustmentCorrection Work00
14ABC A65-HBKL Instrumental adjustmentABC0
15ABC Correction Work 12F-4H89 Leather adjustmentCorrection Work11
16ABC Correction Work A28-9834 Glass AdjustmentCorrection Work01
17ABC Correction A25-4RTG Light adjustmentCorrection Work00
18ABC Correction Work A65-A453 Chair adjustmentCorrection Work11
Sheet1
Cell Formulas
RangeFormula
D2:D18D2=SUM(IFERROR(SEARCH("ABC "&MID(SUBSTITUTE(A2,"ABC Correction Work ",""),1,SEARCH(" ",SUBSTITUTE(A2,"ABC Correction Work ",""))),$A$2:$A$18)^0,0))


It has some Condition
1. Work Id such as A45-HGHG should alway start with ABC in case of No correction work
Thanks
 
Upvote 0
Hi Peter thats perfectly working thanks. For those two points you mentioned. You are right I did manual mistakes. Thanks
OK, great. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,839
Members
449,051
Latest member
excelquestion515

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