+ Reply to Thread
Results 1 to 20 of 20

Conditional Formatting With Formulas

  1. #1
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Conditional Formatting With Formulas

    https://dl.dropboxusercontent.com/u/...20Formulas.JPG

    I want to highlight only the cells which contains text.

    I follow these steps;

    a) Styles – Conditional Formatting – Highlight Cell Rules – More Rules – Use A Formula To Determine Which Cells To Format
    b) I enter the formula “=ISTEXT(A1:B10)
    c) I select The Fill From Format

    And nothing happens. Why?

  2. #2
    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,926

    Re: Conditional Formatting With Formulas

    Try...
    =ISTEXT(A1)
    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

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,344

    Re: Conditional Formatting With Formulas

    And please a) upload to the forum and not to Dropbox (not everyone will download from other sites/services) and b) please stop uploading pictures of spreadsheets and upload sample workbooks instead. It is much easier to investigate and diagnose problems and propose solutions with a workbook.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Conditional Formatting With Formulas

    Or alternatively, try this on the area you want to use the conditional formatting:
    =istext(indirect("rc",false))

  5. #5
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Conditional Formatting With Formulas

    Sorry, I'm new in the forum and thank you very much for your help.

    Here is the file. The example is on the sheet named NonNumeric.
    Attached Files Attached Files
    Last edited by zanshin777; 01-26-2015 at 05:15 AM.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,344

    Re: Conditional Formatting With Formulas

    As has been suggested:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    or, to copy with spaces (as opposed to blank/null)

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Some good examples by the way


    Regards, TMS
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Conditional Formatting With Formulas

    Quote Originally Posted by FDibbins View Post
    Try...
    =ISTEXT(A1)
    Why do we select only "A1" whereas the range?

  8. #8
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Conditional Formatting With Formulas

    Quote Originally Posted by FDibbins View Post
    Try...
    =ISTEXT(A1)
    Why do we select only "A1" whereas the range? How does Excel understand other cells in the range to be highlighted?

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,344

    Re: Conditional Formatting With Formulas

    A CF formula always refers to the top left cell of the range.

  10. #10
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Conditional Formatting With Formulas

    It won't work.

    I select the range. Then I created custom rules which fills the cells which include text blue and fills the cells which include number red. I use reference for only A1.
    Attached Files Attached Files

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,344

    Re: Conditional Formatting With Formulas

    Am I right in thinking you're coming back some 10 months after we last answered your question? And now you're saying it "won't work"

    Whatever. Look at the formula. It does not refer to cell A1; you have
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS

  12. #12
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Conditional Formatting With Formulas

    If the range may have empty or null cells that you don't want formatted until filled, select the whole range (I'm assuming a start in A1 and using the range A1:A200). The range does not show in the formula but only in the Applies To after the rule is created.
    For the numbers:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    For the text:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  13. #13
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Conditional Formatting With Formulas

    Is the test for <>"" necessary?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  14. #14
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,344

    Re: Conditional Formatting With Formulas

    @Ron: the problem is that the formula used does NOT refer to cell A1 ... although that was what was advised originally.

    @Tony: probably not, but I don't think it hurts.

  15. #15
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Conditional Formatting With Formulas

    I set up error situations in an extended range where the result was "" and they became formatted as text. So, I included the <>"".

  16. #16
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Conditional Formatting With Formulas

    I exactly did what I say. If you follow what I do from scratch you get the exact situation.

    However If you set up a rule once and then try to edit and refer "A1" it works strangely.

    How to do it in a one step?
    Last edited by zanshin777; 12-05-2015 at 06:01 PM.

  17. #17
    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,926

    Re: Conditional Formatting With Formulas

    CF works on an array basis. You tell it where to start and what the range it - then tell it what the rule/s is/are...it takes care of all the rest.

    If your range is A1:J10, and your rule is =A1=10, if you click on J10 and look to see what the rule there is, it will still say =A1=10 but that has been appllied to the entire range

  18. #18
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,344

    Re: Conditional Formatting With Formulas

    Select cell A1.
    Hold the Shift Key and press End and Down Arrow
    (this will select the cells in column A, from cell A1 down)
    (Note that the Active Cell is cell A1)
    Now select Conditional Formatting
    Select Use Formula
    Type in one of the formulae that have been suggested.
    OK
    Apply
    Done

  19. #19
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Conditional Formatting With Formulas

    Quote Originally Posted by zanshin777 View Post
    I exactly did what I say. If you follow what I do from scratch you get the exact situation.

    However If you set up a rule once and then try to edit and refer "A1" it works strangely.

    How to do it in a one step?
    It looks like when you put A1 into the Format values where this formula is true: formula box you

    edited $A$1 by deleting / backspacing the $ out. Format manager then changes that to A1048576.

    It appears to be an idiosyncrasy of Format manager. Instead of editing the $A$1 press the F4 function

    key repeatedly until you get the relative / absolute reference you want. It holds the address then.
    Dave

  20. #20
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,344

    Re: Conditional Formatting With Formulas

    Thanks for the rep.

+ 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. Conditional formatting and Formulas...
    By jkeelin in forum Excel General
    Replies: 3
    Last Post: 08-01-2014, 08:37 AM
  2. [SOLVED] Using Conditional Formatting with other formulas
    By billyshears in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-06-2013, 08:37 AM
  3. Conditional Formatting and Formulas
    By athena73 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-16-2013, 03:53 PM
  4. Replies: 1
    Last Post: 09-14-2010, 03:45 AM
  5. Conditional Formatting for formulas
    By Mary Frances in forum Excel General
    Replies: 1
    Last Post: 01-04-2008, 06:15 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