+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting "if text includes a phone number"

  1. #1
    Registered User
    Join Date
    04-09-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    2

    Conditional Formatting "if text includes a phone number"

    Hi,

    I need a new rule for conditional formatting to highlight the cell if it contains a number. It most likely will also contain text (which is ok). I have a column with names and some contain phone numbers. I want those cells (with phone #s) in bold font. Thank you.

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Conditional Formatting "if text includes a phone number"

    Welcome to the forum.

    This formula works to check if a cell (A2) contains a number, returning TRUE if it does:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Unfortunately, Excel won't allow the use of arrays in conditional formats, so you can't use this directly as the CF formula. What you can do is insert an extra 'helper column' (let's say a new column B) containing the above formula then use CF based on that helper column (which you can hide - it'll still work).

    So, step by step (this assumes the column you want to highlight is column A and data starts on row 2 - adjust as necessary for your actual column letter and start row):
    1. Insert a new column to the right of column A.
    2. In B2, enter this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3. Drag down as far as you need.
    4. Select your data in column A (let's say A2:A100).
    5. On the Home tab of the ribbon, click 'Conditional Formatting', then 'New Rule', then 'Use a formula to determine which cells to format'.
    6. In the formula box, enter this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    7. Click 'Format' then the 'Font' tab and choose 'Bold' format.
    8. Click OK twice to get back to the worksheet.
    9. (Optional) Hide the helper column B.

    Hope that does what you want.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Conditional Formatting "if text includes a phone number"

    I don't 0 think 5 here 6 is a 7 phone number
    TRUE

    I don't 0 think 5 here 6 is a 7 phone number
    ={COUNT(SEARCH({0,1,2,3,4,5,6,7,8,9},A1))>0}

    Could you attached samples file, please?
    Maybe we can find solution with more information about syntax of your data.
    Last edited by KOKOSEK; 06-21-2019 at 10:25 AM.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Conditional Formatting "if text includes a phone number"

    Kokosek makes a good point. My answer in post 2 assumes that the only cells with numbers in are those which contain phone numbers. If that is not the case, then we'll need to know more about how the information in the cells is organised.

  5. #5
    Registered User
    Join Date
    04-09-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    2

    Re: Conditional Formatting "if text includes a phone number"

    Thank you very much! Just a point for thought. I use the following formula in a google doc (spreadsheet) under Conditional Formatting:
    =regexmatch(F1&"","[0-9]") and then use the bold font option if the condition is met, all in one step.

    I was kind of hoping it would have been workable in excel. With that said, I appreciate the workaround.

+ 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] Phone number format - reference post (Formatting Textbox to type phone numbers only)
    By eddyrcabrera79 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-01-2015, 05:35 PM
  2. [SOLVED] Date Formatting when Formula Includes Text
    By phelbin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-12-2015, 03:39 PM
  3. Conditional formatting for specific phone number format
    By nwpassage in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-10-2015, 12:30 PM
  4. Formatting as Phone Number from Text
    By sgrey24 in forum Excel General
    Replies: 1
    Last Post: 01-13-2014, 06:32 PM
  5. [SOLVED] Counting Cells that includes exact match and also if a cell includes specific text
    By smclachlan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-19-2012, 07:42 PM
  6. phone number formatting
    By djbetterly in forum Excel General
    Replies: 2
    Last Post: 12-08-2009, 06:06 PM
  7. Phone Number formatting
    By ChrisMattock in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-22-2006, 10:10 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