+ Reply to Thread
Results 1 to 3 of 3

Cell conditional formatting

Hybrid View

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Cell conditional formatting

    I have a cell G9 on my Excel worksheet that links to data on a hidden sheet. The data contains possible contract verbage options that are:

    AIP
    Standard
    Implant Pass Thru
    Implant Pass-Thru PPR
    No Implant Pass-thru PPR

    When one of these is selected, I want one of the two textboxes to grey out so no data can be entered into that textbox that corresponds with the above list. The 2 textboxes are: AB Standard which is cell B124 and Supply UB standard which is cell B125.

    If the user selects AIP or Implant Pass Thru, then monetary is to be filled in Supply UB. If they selected one of the other 3, the monetary is to be filled in AB Standard. I am not sure how to use conditional formatting to code this or if I even can. I was thinking an IF statement somehow in cell B124 and B125 that says something about if cell G9 = "whatever" then enable that cell if not grey out. Just not sure how to go about doing that.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Cell conditional formatting

    You can do this with data validation and logic in them.

    Can you post a sample dataset?
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    01-16-2014
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Cell conditional formatting

    Got my answer:
    Option Explicit
    
    Private Sub Worksheet_Change(ByVal Target As Range)
    
    If Target <> Range("G9") Then Exit Sub
    ActiveSheet.Unprotect
    
    If Range("G9").Value = "Implant Pass-through: Auto Inovice Pricing (AIP)" Then
    Range("B69").Locked = True
    Range("B67").Locked = False
    End If
    
    If Range("G9").Value = "Implant Pass-through: PPR Tied to Invoice" Then
    Range("B67").Locked = True
    Range("B69").loced = False
    End If
    ActiveSheet.Protect
    End Sub

+ 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 via VBA: Change formatting in range based on value of each cell
    By ralphjmedia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2013, 10:37 AM
  2. Delete Conditional Formatting conditions but keep cell formatting - Excel 2010
    By tetreama in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2012, 08:28 PM
  3. Replies: 3
    Last Post: 05-15-2012, 04:13 PM
  4. Macro for formatting fonts and cell colours - not Conditional Formatting
    By Kayaness in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-07-2011, 03:46 AM
  5. Replies: 2
    Last Post: 11-02-2007, 12:03 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