+ Reply to Thread
Results 1 to 5 of 5

if conditional format, then a phone number

  1. #1
    Forum Contributor
    Join Date
    10-24-2012
    Location
    San Diego, USA
    MS-Off Ver
    Excel 2019
    Posts
    844

    if conditional format, then a phone number

    HI, I have the following formula in a cell base on a name. so if i pull a designers name , it will show his phone number

    Please Login or Register  to view this content.
    but when its empty, its shows "FALSE", maybe i am using a wrong method. please help, thank you.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: if conditional format, then a phone number

    The form of the IF function is

    IF(condition, what to return it the condition is TRUE, what to return if the condition is FALSE)

    You left out the last argument, so that when Designer is not David, you get FALSE. To leave it blank use this:
    =IF(Designer="David","619"&"-"&"555"&"-"&"5555","")
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: if conditional format, then a phone number

    You can avoid the FALSE result by doing this:

    =IF(Designer="","",IF(Designer="David","619"&"-"&"555"&"-"&"5555"))

    but if you have more than one designer then it would be better to set up a table of names and phone numbers and use a VLOOKUP function.

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    10-24-2012
    Location
    San Diego, USA
    MS-Off Ver
    Excel 2019
    Posts
    844

    Re: if conditional format, then a phone number

    Thank you 6stringJazzer and Pete_UK. Both worked, and about the name ranges, i just have too many name ranges now, and since i only have 1 designer, this will do. Thank you both again.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: if conditional format, then a phone number

    Glad to help, and thanks for the rep.

    Pete

+ 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. For Format Phone Number
    By Imrank in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2018, 03:59 AM
  2. [SOLVED] Format for Phone Number - Won't work
    By loftus49 in forum Excel General
    Replies: 4
    Last Post: 08-05-2018, 08:27 PM
  3. [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
  4. Conditional formatting for specific phone number format
    By nwpassage in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-10-2015, 12:30 PM
  5. Format a Phone Number
    By scotfitz in forum Excel General
    Replies: 4
    Last Post: 12-23-2009, 07:01 PM
  6. how do I add phone number format as a permanent custom format?
    By frustratedagain in forum Excel General
    Replies: 3
    Last Post: 02-03-2006, 11:52 PM
  7. Format A TextBox For A Phone Number
    By Minitman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2005, 06:06 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