Find Specific String in Row and add to column on left hand side

jessica116

New Member
Joined
Sep 29, 2020
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hi, I am working on a production schedule file. A company is producing batches of product and each batch goes through three different processes. Each color represents a new process and GP/SP/RP represents a different location of the batch. I am wanting to have excel generate in a column on the left hand side which GP/SP/RP is being used for the specific batch (hopefully with a function). See photo.

For example, Batch 1640 will have separate columns on the left hand side that state GP2, SP1, and RP12 are in use.

I have a function that I created to count the colors in a row and total them on the left hand side. This is what I am wanting but for the exact string name. Below I have pasted the count color function I created as reference.

Function countcolor(rangedata As Range, criteria As Range) As Long
Dim datax As Range
Dim xcolor As Long
xcolor = criteria.Interior.ColorIndex
For Each datax In rangedata
If datax.Interior.ColorIndex = xcolor Then
countcolor = countcolor + 1
End If
Next datax
End Function
 

Attachments

  • Schedule.jpg
    Schedule.jpg
    103.6 KB · Views: 10

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Cross posted Find Specific String in Row and add to column on left hand side

While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered elsewhere.
 
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