+ Reply to Thread
Results 1 to 22 of 22

Using Conditional formatting and IF THEN Statement

  1. #1
    Registered User
    Join Date
    07-17-2015
    Location
    Portland, Oregon
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    10

    Using Conditional formatting and IF THEN Statement

    I am trying to use conditional formatting to display text in a cell if specific text is in a cell on the same row
    Example:

    B11 is where I want the formula to insert Install if cell I11 contains Install and do nothing if it does not contain that text.
    I also want this to work with the following rows futher down the sheet.
    So B12 would look at I12, etc, etc.

    I can use the formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The rest of the cells down Column B I am entering text into them manually.

    Problem:
    This formula works only if I paste it into the cell itself.
    IE: It does not seem to work in the Conditional Formatting Rules Manager.

    Is there a limitation for this function?
    Last edited by Artimis07; 07-17-2015 at 03:16 PM.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,179

    Re: Using Conditional formatting and IF THEN Statement

    conditional formatting only changes
    the format of the cell
    based on if a condition is true

    it will not change the contents of the cell

    the formula needs to be in the cell itself and then copied down

    i dont see a conditional formatting requirement in what you have said
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  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
    49,134

    Re: Using Conditional formatting and IF THEN Statement

    Is there a limitation for this function?
    Well, yes, the clue is in the name of the functionality; Conditional Formatting. It doesn't have the capability to insert text, only modify formatting.


    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
    Registered User
    Join Date
    07-17-2015
    Location
    Portland, Oregon
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    10

    Re: Using Conditional formatting and IF THEN Statement

    And if I remember correctly, there is no way to have a cell modify another cell depending on a 3rd cell's value?

    IE:
    A1 Contains YES

    A2 has theoretical formula that copies text from A1 into B2, if C2 contains "Scheduled"

  5. #5
    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
    49,134

    Re: Using Conditional formatting and IF THEN Statement

    A formula cannot change the contents of another cell, only the value in the cell in which it resides.

    To change one cell based on another cell, you'd need VBA. Specifically, a Worksheet Change event handler monitoring the cell(s) that change.

    Regards, TMS

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,179

    Re: Using Conditional formatting and IF THEN Statement

    =IF( C2="Scheduled", A1, "" )

    put in B2

  7. #7
    Registered User
    Join Date
    07-17-2015
    Location
    Portland, Oregon
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    10

    Re: Using Conditional formatting and IF THEN Statement

    Okay, thank you guys!

  8. #8
    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
    49,134

    Re: Using Conditional formatting and IF THEN Statement

    Ah, looks like I misread/misunderstood your question


    Regards, TMS

  9. #9
    Registered User
    Join Date
    07-17-2015
    Location
    Portland, Oregon
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    10

    Re: Using Conditional formatting and IF THEN Statement

    TMS,

    No you were correct. In order to do what I want I need to have an external application do it for me.

  10. #10
    Registered User
    Join Date
    07-17-2015
    Location
    Portland, Oregon
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    10

    Re: Using Conditional formatting and IF THEN Statement

    Quote Originally Posted by TMS View Post
    Ah, looks like I misread/misunderstood your question


    Regards, TMS
    TMS,

    No you were correct. In order to do what I want I need to have an external application do it for me.

  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
    49,134

    Re: Using Conditional formatting and IF THEN Statement

    Ah, OK. It can be done with VBA which is built into Excel.

  12. #12
    Registered User
    Join Date
    07-17-2015
    Location
    Portland, Oregon
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    10

    Re: Using Conditional formatting and IF THEN Statement

    Quote Originally Posted by TMS View Post
    Ah, OK. It can be done with VBA which is built into Excel.
    Do you have instructions or an example that I can use in VBA to do this?

    Specifically I need this:

    B11 is blank and is the cell I need auto populated
    I11 is what I am looking at for the text Install

    I want it to put the text Install into cell B11 when the cell I11 has the text Install

  13. #13
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,179

    Re: Using Conditional formatting and IF THEN Statement

    and you cant put a formula into B11 at all - is that correct

  14. #14
    Registered User
    Join Date
    07-17-2015
    Location
    Portland, Oregon
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    10

    Re: Using Conditional formatting and IF THEN Statement

    Quote Originally Posted by etaf View Post
    and you cant put a formula into B11 at all - is that correct
    That is correct

  15. #15
    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
    53,053

    Re: Using Conditional formatting and IF THEN Statement

    Can I ask why?
    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

  16. #16
    Registered User
    Join Date
    07-17-2015
    Location
    Portland, Oregon
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    10

    Re: Using Conditional formatting and IF THEN Statement

    The field gets cleared every day in order to type in that days status.

    The reason I want it to auto populate the text there, is that these certain rows are typically the same for multiple days and if I were to auto populate them, it would speed up the process immensly.

    The rest of the rows of data, I have to manually verify their status.

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

    Re: Using Conditional formatting and IF THEN Statement

    Please Login or Register  to view this content.

    Regards, TMS

  18. #18
    Registered User
    Join Date
    07-17-2015
    Location
    Portland, Oregon
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    10

    Re: Using Conditional formatting and IF THEN Statement

    Alright, now for the newbie questions.

    How do i implement this :P

    I have created a new module and pasted your code into the new Module.

  19. #19
    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
    49,134

    Re: Using Conditional formatting and IF THEN Statement

    No. Right click on the tab where the data is. Select View Code. Copy and Paste the code there.

    Then change I11.

    Regards, TMS

  20. #20
    Registered User
    Join Date
    07-17-2015
    Location
    Portland, Oregon
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    10

    Re: Using Conditional formatting and IF THEN Statement

    Let me know if this is getting to be a lot of work.

    I need it to change all the below rows as well if possbile.
    So B12 = I12, B13=I13, Etc

    Secondly, (should ahve mentioned this earlier) I have my excel sheet pulling data from a SQL database that is entering the data to my sheet.
    This is what is changing Column I to Install or blank.

    Manually changing I11 did change B11, but ti does not change until I remove Install from I11.
    When my sql query pulls again and places Install back into I11, B11 does not change again until I manualy type into I11 again.

  21. #21
    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
    49,134

    Re: Using Conditional formatting and IF THEN Statement

    I don't know about the SQL part but the code was specifically designed NOT to handle multiple changes.

    I'll see about changing that. No guarantees though.

  22. #22
    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
    49,134

    Re: Using Conditional formatting and IF THEN Statement

    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. Conditional formatting with if statement
    By K120 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-25-2014, 02:39 PM
  2. Conditional Formatting/IF statement Help
    By DayHey23 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2013, 12:37 PM
  3. Conditional Formatting with IF Statement
    By walt222 in forum Excel - New Users/Basics
    Replies: 16
    Last Post: 11-23-2011, 01:08 PM
  4. Conditional formatting or IF statement
    By banny85 in forum Excel General
    Replies: 1
    Last Post: 06-08-2011, 12:56 PM
  5. IF statement using formatting criteria (NOT conditional formatting)
    By chelseasikoebs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2009, 01:57 AM
  6. Conditional Formatting with an If statement
    By Shirley Munro in forum Excel General
    Replies: 3
    Last Post: 10-25-2007, 10:11 PM
  7. Conditional Formatting - IF Statement
    By todd.debacker in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-27-2007, 03:39 PM
  8. [SOLVED] If Statement/Conditional Formatting
    By JS in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-29-2006, 11:55 AM

Tags for this Thread

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