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: 21

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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