+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting to highlight cell based on values in a string

  1. #1
    Registered User
    Join Date
    10-14-2013
    Location
    Saginaw, MI
    MS-Off Ver
    Excel 2010
    Posts
    2

    Conditional Formatting to highlight cell based on values in a string

    looking for VBA script or conditional formatting formula that will fill cell in column A yellow if cell in same row of column H equals "BP" and text string in cell in same row of column O contains a value of "3" or "4" or "5" or "6" or "7"
    Attached Files Attached Files
    Last edited by thrst2no; 02-16-2015 at 06:14 PM. Reason: improver clarification of request

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Conditional Formatting to highlight cell based on values in a string

    VBA:
    Please Login or Register  to view this content.

  3. #3
    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
    52,917

    Re: Conditional Formatting to highlight cell based on values in a string

    @ waqlrus, not sure that will work. Most of the 3, 4, 5, 6, 7 etc are actually text, not values 03, 04 etc (9/25 are values)

    @thrst2no welcome to the forum

    Can you stanardize on your entry method in column O?
    O
    2
    08, 09, 10
    3
    09, 10
    4
    4
    5
    7

    O2:O3 are text entries, O4:O5 are values.
    Searching for 4 (numeric) is not the same as searching for 04 (text)
    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

  4. #4
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Conditional Formatting to highlight cell based on values in a string

    Correct, FDibbins. I don't think there was a workbook posted when I responded, so I wasn't aware of formatting. I think this will work, it shouldn't matter if O values are text or numbers.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-14-2013
    Location
    Saginaw, MI
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Conditional Formatting to highlight cell based on values in a string

    Thanks for welcoming me to the forum. This is my very first post, so I'm feeling my way thru it.
    There is no data entry on my part. Worksheet is an imported .csv file extracted from a db. Will be importing many .csv files and looking to run a macro to format each worksheet for data analysis.

  6. #6
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Conditional Formatting to highlight cell based on values in a string

    Then how about this?

    Please Login or Register  to view this content.

+ 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] Conditional Formatting - Highlight cell based on two criteria
    By HomerGuy in forum Excel General
    Replies: 3
    Last Post: 01-26-2015, 03:50 PM
  2. Replies: 4
    Last Post: 11-18-2014, 04:12 AM
  3. Replies: 4
    Last Post: 07-25-2014, 05:17 AM
  4. Replies: 7
    Last Post: 06-10-2013, 09:39 AM
  5. Replies: 6
    Last Post: 05-16-2008, 06:28 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