How many values between other values (count number cells between two of the same text)

nearbeer

New Member
Joined
Feb 14, 2011
Messages
18
Thank you for taking the time to look at my question.

I have a production query that returns several columns of production data; see the example below:

Scan Date
Operation TypeProduct CodeMachine #Workpost #Barcode Serial Number
09/19/2014 23:49CACARCJ80S2586S2F0158625478
09/19/2014 23:49CACARCAF0T1658T1F0165804077
09/19/2014 23:28CACARCAF0T1658T1F0165804076
09/19/2014 23:29CACARCJ80S2586S2F0158625477
09/19/2014 23:31PRFECX187029S2FEX17092014-A85
09/19/2014 22:58CACARCAF0T1658T1F0165804070
09/19/2014 16:29CACARC9L0S2688S2F0168850901
09/19/2014 16:23CACARC9L0S2688S2F0168850900
09/19/2014 16:20CACARCAF0T1658T1F0165804012
09/19/2014 16:24PRFECX166884S2FEX18092014-D14

<tbody>
</tbody>

What I need to do is count the number of “Barcode Serial Numbers” between “Workpost #” on the same machine; IOTW, for S2 (Machine # column) I need to count the number of products that start with “CARC….” from the Product Code column which occur between “FEX” in the “Workpost #” for the same machine.

What makes this a bit complicated is that there are multiple values for each workpost (not just F01 & FEX). I need to be able to figure out for each machine number, how many “CARC” were made in between “FEX”; in this case it is (2)…I have deleted a number of rows to clean up the sheet a bit.

Again, I appreciate your help!
 
Last edited:

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

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