+ Reply to Thread
Results 1 to 13 of 13

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

  1. #1
    Registered User
    Join Date
    09-29-2020
    Location
    Iceland
    MS-Off Ver
    2016
    Posts
    6

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

    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
    Attached Images Attached Images

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,056

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

    You could use a formula such as: =COUNTIF(J2:V2,"GP*") changing the range to suit your needs and then copying the formula down and change the text in quotes for each of the three locations.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    09-29-2020
    Location
    Iceland
    MS-Off Ver
    2016
    Posts
    6

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

    This will count the number of GP's in the row not generate which GP is in use. I am looking to generate which GP is being used and put the entire string (i.e. GP*) in a left hand column.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,056

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

    It's hard to work with a picture. It would be easier to help and test possible solutions if you could attach a copy of your file. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary). Manually insert your expected results in your sheet. See the yellow banner at the top of this page for instructions to attach a file.

  5. #5
    Registered User
    Join Date
    09-29-2020
    Location
    Iceland
    MS-Off Ver
    2016
    Posts
    6

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

    I have attached the file in question.

    The columns that are going to be generated are columns E, F, and G, highlighted in yellow. E30, F30, G30, in red font, are samples of what I am wanting the output to look like.
    Attached Files Attached Files

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,056

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

    What do you want to do with values that have a number in brackets such as: GP8 (5)

  7. #7
    Registered User
    Join Date
    09-29-2020
    Location
    Iceland
    MS-Off Ver
    2016
    Posts
    6

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

    This was my problem 2. Ideally, there will be another 3 columns that will specify how many rows have used GP8. So GP8 (5) means this is the 5th time GP8 has been used. Instead of having in brackets, there will be another column that has number of times been used. See new excel for sample of output. Highlighted in orange are the new columns where the output will be stored. In red font, are samples of what the output should look like.
    Attached Files Attached Files

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,056

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

    Can you explain in detail how you got the 1's and 0's in columns H, I and J?

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

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

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  10. #10
    Registered User
    Join Date
    09-29-2020
    Location
    Iceland
    MS-Off Ver
    2016
    Posts
    6

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

    I am unable to post a url. Maybe you could tell me how to cross reference..

  11. #11
    Registered User
    Join Date
    09-29-2020
    Location
    Iceland
    MS-Off Ver
    2016
    Posts
    6

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

    If the RP number is seen in the previous rows, it will log in column J how many times it is seen. Same goes for GP and SP.

  12. #12
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,056

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

    You will have to comply with the Administrator's request before we can proceed. Did you try copying the link and pasting it here?

  13. #13
    Registered User
    Join Date
    09-28-2020
    Location
    Germany
    MS-Off Ver
    Onysysoju
    Posts
    1

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

    Hi SSJ3, if you are using the horse and track number for your reference only, then inserting two columns shouldnt be a problem. Excel will automatically update the formulas for you. Just note that there are some merged cells above the table.

    If you are looking to reference the track and horse numbers in the Performance sheet, my recommendation is to use the existing Tipper and Custom variable columns to record this data.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Start typing from left hand side? (Within Cell)
    By Dagoom in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-11-2015, 11:14 AM
  2. [SOLVED] Function Call on left-hand side... error
    By SeanDamnit in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2012, 07:08 AM
  3. Need to Insert Labels on Left and Right Hand Side of Graph
    By John Vieren in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-07-2009, 09:29 AM
  4. Static left hand side column and static header row.. how?
    By glic in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-20-2007, 01:45 AM
  5. Replies: 1
    Last Post: 03-13-2005, 01:06 PM
  6. [SOLVED] y-axis moves from the left hand side to the right hand side!
    By JP in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-10-2005, 09:06 PM
  7. [SOLVED] How do I get my y axis on the left hand side of my chart?
    By Aneleh in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 02-08-2005, 02:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1