+ Reply to Thread
Results 1 to 8 of 8

Find text in cell using cells object with-in IF Then statement

  1. #1
    Registered User
    Join Date
    05-16-2012
    Location
    Guernsey, C.I
    MS-Off Ver
    Microsoft 365 MSO (Version 2402 Build 16.0.17328.20550) 64-bit
    Posts
    39

    Find text in cell using cells object with-in IF Then statement

    Im am trying to find particular text in a cell then format adjacent cells in the same row. In my code below I am trying to search for "*[Tx]*" using Like, however this is formatting all text that contain "T".

    Any help much appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Find text in cell using cells object with-in IF Then statement

    can you attach a sample file with data and desired result ?
    If solved remember to mark Thread as solved

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Find text in cell using cells object with-in IF Then statement

    Try this:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-16-2012
    Location
    Guernsey, C.I
    MS-Off Ver
    Microsoft 365 MSO (Version 2402 Build 16.0.17328.20550) 64-bit
    Posts
    39

    Re: Find text in cell using cells object with-in IF Then statement

    Quote Originally Posted by stnkynts View Post
    Try this:

    Please Login or Register  to view this content.

    Hi stnkynts,
    Thanks for the code this works, could the last column used be include to replace EntireRow for the cell borders formatting, apologies I should have included this is my initial request?

  5. #5
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Find text in cell using cells object with-in IF Then statement

    Maybe this:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-16-2012
    Location
    Guernsey, C.I
    MS-Off Ver
    Microsoft 365 MSO (Version 2402 Build 16.0.17328.20550) 64-bit
    Posts
    39

    Re: Find text in cell using cells object with-in IF Then statement

    Almost there, I have attached a workbook showing a before and after worksheet. The before worksheet "Statement of Profit & Loss" is prior to any macro being run the "Statement of Profit & Loss NEW" is what I want the worksheet to look like.
    Attached Files Attached Files
    Last edited by DevfromCorrie; 05-06-2014 at 02:28 PM. Reason: Wrong file loaded

  7. #7
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Find text in cell using cells object with-in IF Then statement

    This would have been much easier had we had the workbook in the first place.

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    05-16-2012
    Location
    Guernsey, C.I
    MS-Off Ver
    Microsoft 365 MSO (Version 2402 Build 16.0.17328.20550) 64-bit
    Posts
    39

    Re: Find text in cell using cells object with-in IF Then statement

    Many thanks this is exactly what im after.

+ 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 some cell's text in another column and get the text of those cells
    By simone77 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-25-2013, 11:39 AM
  2. find and list cells based on text on its next cell
    By calif in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-13-2013, 04:24 AM
  3. Formula to Find If Text In a Cell Matches Another Range of Cells
    By purplesamcat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-03-2013, 07:45 PM
  4. Problems with Cells.Find. Object/Block variable not set
    By mattisch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2007, 09:06 AM
  5. find text in a cell and make cell 2 cells below that active
    By shark102 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-20-2005, 10: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