+ Reply to Thread
Results 1 to 7 of 7

dropdownlist selection changed - grey out cells

  1. #1
    Jagdip Singh Ajimal
    Guest

    dropdownlist selection changed - grey out cells

    I have a cell where I have put data validation in. The validation is a
    selection from a list.
    I want to gery out a cell when a certain value is selected in the
    list. Can I do this?

    Do I have to use a combo box and a macro instead?

  2. #2
    Debra Dalgleish
    Guest

    Re: dropdownlist selection changed - grey out cells

    You can use conditional formatting on the other cell.

    For example, to grey out cell E3, if "No" is selected in cell D3:

    Select cell E3
    Choose Format>Conditional Formatting
    From the first dropdown, choose Formula Is
    In the formula box, type: =D3="No"
    Click the Format button
    On the Patterns tab, select the grey colour
    Click OK, click OK.

    Jagdip Singh Ajimal wrote:
    > I have a cell where I have put data validation in. The validation is a
    > selection from a list.
    > I want to gery out a cell when a certain value is selected in the
    > list. Can I do this?
    >
    > Do I have to use a combo box and a macro instead?



    --
    Debra Dalgleish
    Excel FAQ, Tips & Book List
    http://www.contextures.com/tiptech.html


  3. #3
    Jagdip Singh Ajimal
    Guest

    Re: dropdownlist selection changed - grey out cells

    Brill. Thank you.


    Debra Dalgleish <dsd@contexturesXSPAM.com> wrote in message news:<42584375.7070406@contexturesXSPAM.com>...
    > You can use conditional formatting on the other cell.
    >
    > For example, to grey out cell E3, if "No" is selected in cell D3:
    >
    > Select cell E3
    > Choose Format>Conditional Formatting
    > From the first dropdown, choose Formula Is
    > In the formula box, type: =D3="No"
    > Click the Format button
    > On the Patterns tab, select the grey colour
    > Click OK, click OK.
    >
    > Jagdip Singh Ajimal wrote:
    > > I have a cell where I have put data validation in. The validation is a
    > > selection from a list.
    > > I want to gery out a cell when a certain value is selected in the
    > > list. Can I do this?
    > >
    > > Do I have to use a combo box and a macro instead?


  4. #4
    Jagdip Singh Ajimal
    Guest

    Re: dropdownlist selection changed - grey out cells

    Is there any way I can also disable the geryed out cell as well (when
    the condition is false).


    jsa1981@hotmail.com (Jagdip Singh Ajimal) wrote in message news:<c84eb1b0.0504100322.10a5b3ff@posting.google.com>...
    > Brill. Thank you.
    >
    >
    > Debra Dalgleish <dsd@contexturesXSPAM.com> wrote in message news:<42584375.7070406@contexturesXSPAM.com>...
    > > You can use conditional formatting on the other cell.
    > >
    > > For example, to grey out cell E3, if "No" is selected in cell D3:
    > >
    > > Select cell E3
    > > Choose Format>Conditional Formatting
    > > From the first dropdown, choose Formula Is
    > > In the formula box, type: =D3="No"
    > > Click the Format button
    > > On the Patterns tab, select the grey colour
    > > Click OK, click OK.
    > >
    > > Jagdip Singh Ajimal wrote:
    > > > I have a cell where I have put data validation in. The validation is a
    > > > selection from a list.
    > > > I want to gery out a cell when a certain value is selected in the
    > > > list. Can I do this?
    > > >
    > > > Do I have to use a combo box and a macro instead?


  5. #5
    Debra Dalgleish
    Guest

    Re: dropdownlist selection changed - grey out cells

    You could use data validation to disable the greyed out cell:

    Select cell E3
    Choose Data>Validation
    From the Allow dropdown, choose Custom
    In the Formula box, type: =D3<>"No"
    Click OK

    Jagdip Singh Ajimal wrote:
    > Is there any way I can also disable the geryed out cell as well (when
    > the condition is false).
    >
    >
    > jsa1981@hotmail.com (Jagdip Singh Ajimal) wrote in message news:<c84eb1b0.0504100322.10a5b3ff@posting.google.com>...
    >
    >>Brill. Thank you.
    >>
    >>
    >>Debra Dalgleish <dsd@contexturesXSPAM.com> wrote in message news:<42584375.7070406@contexturesXSPAM.com>...
    >>
    >>>You can use conditional formatting on the other cell.
    >>>
    >>>For example, to grey out cell E3, if "No" is selected in cell D3:
    >>>
    >>>Select cell E3
    >>>Choose Format>Conditional Formatting
    >>> From the first dropdown, choose Formula Is
    >>>In the formula box, type: =D3="No"
    >>>Click the Format button
    >>>On the Patterns tab, select the grey colour
    >>>Click OK, click OK.
    >>>
    >>>Jagdip Singh Ajimal wrote:
    >>>
    >>>>I have a cell where I have put data validation in. The validation is a
    >>>>selection from a list.
    >>>>I want to gery out a cell when a certain value is selected in the
    >>>>list. Can I do this?
    >>>>
    >>>>Do I have to use a combo box and a macro instead?
    >>>



    --
    Debra Dalgleish
    Excel FAQ, Tips & Book List
    http://www.contextures.com/tiptech.html


  6. #6
    jsa1981@hotmail.com
    Guest

    Re: dropdownlist selection changed - grey out cells

    Ahh, thank you. You should write a book or something ;-)

    But, just one last problem. When a certain value is selected in the
    ddl, I can:
    - grey out the cell.
    - disable the cell.

    But, when I select "no" in the ddl, I also want to remove the text in
    the cell. Is there a way I can do this aswell?

    Again, thank you for your help.


    Debra Dalgleish wrote:
    > You could use data validation to disable the greyed out cell:
    >
    > Select cell E3
    > Choose Data>Validation
    > From the Allow dropdown, choose Custom
    > In the Formula box, type: =D3<>"No"
    > Click OK
    >
    > Jagdip Singh Ajimal wrote:
    > > Is there any way I can also disable the geryed out cell as well

    (when
    > > the condition is false).
    > >
    > >
    > > jsa1981@hotmail.com (Jagdip Singh Ajimal) wrote in message

    news:<c84eb1b0.0504100322.10a5b3ff@posting.google.com>...
    > >
    > >>Brill. Thank you.
    > >>
    > >>
    > >>Debra Dalgleish <dsd@contexturesXSPAM.com> wrote in message

    news:<42584375.7070406@contexturesXSPAM.com>...
    > >>
    > >>>You can use conditional formatting on the other cell.
    > >>>
    > >>>For example, to grey out cell E3, if "No" is selected in cell D3:
    > >>>
    > >>>Select cell E3
    > >>>Choose Format>Conditional Formatting
    > >>> From the first dropdown, choose Formula Is
    > >>>In the formula box, type: =D3="No"
    > >>>Click the Format button
    > >>>On the Patterns tab, select the grey colour
    > >>>Click OK, click OK.
    > >>>
    > >>>Jagdip Singh Ajimal wrote:
    > >>>
    > >>>>I have a cell where I have put data validation in. The validation

    is a
    > >>>>selection from a list.
    > >>>>I want to gery out a cell when a certain value is selected in the
    > >>>>list. Can I do this?
    > >>>>
    > >>>>Do I have to use a combo box and a macro instead?
    > >>>

    >
    >
    > --
    > Debra Dalgleish
    > Excel FAQ, Tips & Book List
    > http://www.contextures.com/tiptech.html



  7. #7
    Debra Dalgleish
    Guest

    Re: dropdownlist selection changed - grey out cells

    You could do that with programming:

    Right-click on the sheet tab
    Choose View Code
    Where the cursor is flashing, paste the following code:

    '==============================
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$D$3" Then
    If UCase(Target.Value) = "NO" Then
    Range("E3").Value = ""
    End If
    End If
    End Sub
    '============================

    jsa1981@hotmail.com wrote:
    > Ahh, thank you. You should write a book or something ;-)
    >
    > But, just one last problem. When a certain value is selected in the
    > ddl, I can:
    > - grey out the cell.
    > - disable the cell.
    >
    > But, when I select "no" in the ddl, I also want to remove the text in
    > the cell. Is there a way I can do this aswell?
    >
    > Again, thank you for your help.
    >
    >
    > Debra Dalgleish wrote:
    >
    >>You could use data validation to disable the greyed out cell:
    >>
    >>Select cell E3
    >>Choose Data>Validation
    >> From the Allow dropdown, choose Custom
    >>In the Formula box, type: =D3<>"No"
    >>Click OK
    >>
    >>Jagdip Singh Ajimal wrote:
    >>
    >>>Is there any way I can also disable the geryed out cell as well

    >>

    > (when
    >
    >>>the condition is false).
    >>>
    >>>
    >>>jsa1981@hotmail.com (Jagdip Singh Ajimal) wrote in message

    >>

    > news:<c84eb1b0.0504100322.10a5b3ff@posting.google.com>...
    >
    >>>>Brill. Thank you.
    >>>>
    >>>>
    >>>>Debra Dalgleish <dsd@contexturesXSPAM.com> wrote in message
    >>>

    > news:<42584375.7070406@contexturesXSPAM.com>...
    >
    >>>>>You can use conditional formatting on the other cell.
    >>>>>
    >>>>>For example, to grey out cell E3, if "No" is selected in cell D3:
    >>>>>
    >>>>>Select cell E3
    >>>>>Choose Format>Conditional Formatting
    >>>>>From the first dropdown, choose Formula Is
    >>>>>In the formula box, type: =D3="No"
    >>>>>Click the Format button
    >>>>>On the Patterns tab, select the grey colour
    >>>>>Click OK, click OK.
    >>>>>
    >>>>>Jagdip Singh Ajimal wrote:
    >>>>>
    >>>>>
    >>>>>>I have a cell where I have put data validation in. The validation
    >>>>>

    > is a
    >
    >>>>>>selection from a list.
    >>>>>>I want to gery out a cell when a certain value is selected in the
    >>>>>>list. Can I do this?
    >>>>>>
    >>>>>>Do I have to use a combo box and a macro instead?
    >>>>>

    >>
    >>--
    >>Debra Dalgleish
    >>Excel FAQ, Tips & Book List
    >>http://www.contextures.com/tiptech.html

    >
    >



    --
    Debra Dalgleish
    Excel FAQ, Tips & Book List
    http://www.contextures.com/tiptech.html


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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