+ Reply to Thread
Results 1 to 11 of 11

Find cell with text, offset to the left one cell and write code

  1. #1
    Registered User
    Join Date
    05-18-2015
    Location
    Vln
    MS-Off Ver
    2007
    Posts
    6

    Find cell with text, offset to the left one cell and write code

    Hello every one,

    Im sorry if there was similar problem and it was solved.

    I have a document with some parts specification and it is needed to find exact text and in nearby cell write that text code.

    For example:
    There are rail bracket position in excel document with different dimensions 40mm, 50mm, 56mm, every different rail bracket dimension have its own code.
    40mm - 227373040
    50mm - 227373050
    56mm - 227373056

    I need that macro find "rail bracket 40mm" and in left cell from that cell where are rail bracket put a code "227373040"
    and for all dimension would made same.
    Number Code Name
    1 Rail Bracket 40mm
    2 Rail Bracket 50mm
    3 Rail Bracket 56mm

    Could anyone help me with that?
    Thank in advance.

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Find cell with text, offset to the left one cell and write code

    Post a small example file so we can see how your sheet is structured and where to get the proper codes for each element etc.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find cell with text, offset to the left one cell and write code

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-18-2015
    Location
    Vln
    MS-Off Ver
    2007
    Posts
    6

    Re: Find cell with text, offset to the left one cell and write code

    This is only small part.

    40 - 227372040
    50 - 227372050
    56 - 227372056
    63 - 227372063
    75 - 227372075
    90 - 227372090
    110 - 227372110
    125 - 227372125
    160 - 227372160
    200 - 227372200
    250 - 227372250
    Attached Files Attached Files

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Find cell with text, offset to the left one cell and write code

    And where are these dimensions and codes located in your file ?
    Different sheet, Same sheet other location ??

  6. #6
    Registered User
    Join Date
    05-18-2015
    Location
    Vln
    MS-Off Ver
    2007
    Posts
    6

    Re: Find cell with text, offset to the left one cell and write code

    they are located in other program.
    so it is need just to write them in macro, not to take from same where

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Find cell with text, offset to the left one cell and write code

    Something like this maybe
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    05-18-2015
    Location
    Vln
    MS-Off Ver
    2007
    Posts
    6

    Re: Find cell with text, offset to the left one cell and write code

    Thanks its work
    Maybe it would be possible to make inserted text to show in green colour?
    if there are to much work, than dont bother, will leave with black

  9. #9
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Find cell with text, offset to the left one cell and write code

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Last edited by bakerman2; 07-21-2015 at 08:24 AM.

  10. #10
    Registered User
    Join Date
    05-18-2015
    Location
    Vln
    MS-Off Ver
    2007
    Posts
    6

    Re: Find cell with text, offset to the left one cell and write code

    one more question.
    how to do the same, only with exact words: "met" and "el"
    if in some B coloum cell are text "met", so in A coloum in same row put code - 227368091
    if in some B coloum cell are text "el", so in A coloum in same row put code - 227377004

    when im trying to do this, code is added even if word is: element, or metal plate, not exact met and el

  11. #11
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Find cell with text, offset to the left one cell and write code

    If you want exact match you cannot use Instr.
    In that case you have to change the code to an If...ElseIf...End If loop.

+ 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. Find Text and display cell to left
    By Austin0896 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-13-2014, 08:13 PM
  2. Replies: 1
    Last Post: 02-04-2014, 01:57 PM
  3. formatting left cell on basis of write cell
    By lalit18276 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-26-2014, 02:38 AM
  4. VBA Code to activate cell if text is found in cell, if not find next value
    By snelson0713 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-01-2013, 11:31 AM
  5. [SOLVED] Macros to find matching text on other sheet and to select an offset cell
    By lottidotti in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2012, 05:59 AM
  6. Find Last Cell In range, and changing another Cell based on offset text
    By radar_jynx in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-05-2009, 04:52 AM
  7. [SOLVED] Find text within cell then display text to left
    By Jambruins in forum Excel General
    Replies: 5
    Last Post: 04-17-2006, 05:10 PM
  8. [SOLVED] UDF code to find specific text in cell comments, then average cell values
    By bruch04 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-05-2005, 06:10 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