+ Reply to Thread
Results 1 to 5 of 5

If / ElseIf Then Macro to check if a cell (partly) contains a specified text value.

  1. #1
    Registered User
    Join Date
    06-12-2012
    Location
    Amsterdam
    MS-Off Ver
    Excel 2010 (Windows) Excel 2011 (Mac)
    Posts
    30

    If / ElseIf Then Macro to check if a cell (partly) contains a specified text value.

    Hi,

    Another little Excel roadblock for me today. Can someone help me out? My problem is described in the simple code below. Thanks!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: If / ElseIf Then Macro to check if a cell (partly) contains a specified text value.

    Hi
    in these circumstance i use

    Please Login or Register  to view this content.
    this picks up any instance of "ORT" in the cell

  3. #3
    Registered User
    Join Date
    06-12-2012
    Location
    Amsterdam
    MS-Off Ver
    Excel 2010 (Windows) Excel 2011 (Mac)
    Posts
    30

    Re: If / ElseIf Then Macro to check if a cell (partly) contains a specified text value.

    Hi Nicky,

    Thanks for the reply. How can I best use that in my macro? Or more precisely, how do I change your line to check if the value contains ORT in the prior column. If that is the case I would like the Macro te write "ORT" in the current column(column B) and nut not replace the existing texts in column A.

  4. #4
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: If / ElseIf Then Macro to check if a cell (partly) contains a specified text value.

    try

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-12-2012
    Location
    Amsterdam
    MS-Off Ver
    Excel 2010 (Windows) Excel 2011 (Mac)
    Posts
    30

    Re: If / ElseIf Then Macro to check if a cell (partly) contains a specified text value.

    Thanks Nicky,

    Works like a charm! The eventuel code has now become:

    Please Login or Register  to view this content.
    Many thanks from sunny Amsterdam!

+ 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. [SOLVED] VBA macro to check if one cell has text and paste a formula in a different cell
    By vitt4300 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-10-2013, 01:38 PM
  2. Code stepping in to elseif statement when elseif is definitely not true
    By DFrank231 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-13-2013, 05:31 PM
  3. Macro to check column A and copy text from cell above
    By robertguy in forum Excel General
    Replies: 0
    Last Post: 08-20-2012, 09:22 AM
  4. [SOLVED] IF Cell.Value partly equals
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-17-2012, 01:23 AM
  5. Make text partly bold, but failed
    By vdongen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-10-2010, 09:05 AM

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