Results 1 to 10 of 12

Thread: Drop-Down Menu with Multiple Conditions

Hybrid View

Anshu Drop-Down Menu with Multiple... 08-27-2020, 06:03 PM
DocAElstein Hi _... I would put your... 08-31-2020, 03:31 PM
DocAElstein _ continued from last post ... 08-31-2020, 03:35 PM
Anshu I think I was unable to... 09-01-2020, 07:29 PM
DocAElstein Hi Point (2) I... 09-02-2020, 02:32 PM
Anshu Thank for the Macro and... 09-01-2020, 07:01 PM
Anshu Finally SOLVED!! Thank you... 09-02-2020, 10:35 PM
DocAElstein Hi OK, this is very good... 09-03-2020, 03:34 PM
Anshu Thank you for refining the... 09-04-2020, 11:58 AM
DocAElstein Hi, A couple of comments... 09-04-2020, 04:27 PM
Anshu Hi! Here I added some more... 09-04-2020, 04:34 PM
Anshu Reason for adding the line... 09-04-2020, 05:07 PM
Previous Post Previous Post   Next Post Next Post
  1. #1
    Member
    Join Date
    May 2020
    Posts
    66
    Rep Power
    6
    Thank for the Macro and explaining everything clearly and systematically!

    While working with this Macro, I found

    (1) When I select the cell "J19" and press the 'delete' key on my keyboard, the cell value is deleted, but the fade font "(Select)" does not appear in the cell "J19".
    However, when I press the backspace key after selecting the cell "J19", "(Select)" appers.

    (2) When I select any option from the drop down menu or enter manually any value in the cell "J19", it apperas in the cell in the same faded font, just like "Select". (Solved!)

    (3) When I select an option in Cell "J19", say "Nuclear Family", the corresponding value in the cell "R19", for example "(Remark if any)", appears in faded font. That's nice.
    But when I type something in the Cell "R19", it appears in the same faded font, just like "(Remarks if any)".

    Point (2), here, is solved by me by making a little bit changes in the provided macro. It is here...


    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
    
        If Target.Address = "$J$19" Then
             If Target.Value = "" Then  '  case a cell was emptied
             Let Application.EnableEvents = False
             Let Target.Value = "(Select Here)"
             Let Range("R19").Value = ""
             Let Application.EnableEvents = True
                     With Target.Font
                     .Color = -3817475
                     End With
               
                 Else  '  case a text was entered
                     With Target.Font
                     .Color = -12316781
                     End With
            End If
               
           Else  ' Target is Not a cell to be acted on
         End If
                         
                
         If Target.Address = "$J$19" Then
         
            If Target.Value = "Nuclear Family" Or Target.Value = "Joint Family" Then
             Let Application.EnableEvents = False
             Let Range("R19").Value = "(Remark if any)"
             Let Application.EnableEvents = True
                With Range("R19").Font
                .Color = 10855845
                '.ColorIndex = 48
                End With
                
            ElseIf Target.Value = "Single-Parent Family" Then
             Let Application.EnableEvents = False
             Let Range("R19").Value = "(Select Reason)"
             Let Application.EnableEvents = True
                With Range("R19").Font
                .Color = 10855845
                '.ColorIndex = 48
                End With
                
            ElseIf Target.Value = "Uncategorised" Then
             Let Application.EnableEvents = False
             Let Range("R19").Value = "(Please Specify the Case)"
             Let Application.EnableEvents = True
                With Range("R19").Font
                .Color = 10855845
                '.ColorIndex = 48
                End With
            End If
        Else
        ' Target is Not a cell to be acted on
        End If
    End Sub

    But I'm unable to solve the Point (3) issue. And point (1) is beyond my area of 'little" knowledge!
    Last edited by Anshu; 09-01-2020 at 10:04 PM.

Similar Threads

  1. Drop-down list of three tables
    By mahmoud-lee in forum Excel Help
    Replies: 12
    Last Post: 02-24-2014, 04:57 AM
  2. Nested If Formula With Multiple Conditions
    By lprc in forum Excel Help
    Replies: 10
    Last Post: 04-22-2013, 07:27 PM
  3. Replies: 4
    Last Post: 03-22-2013, 01:47 PM
  4. Add Macros To Custom Menu
    By mfaisalrazzak in forum Excel Ribbon and Add-Ins
    Replies: 2
    Last Post: 03-01-2013, 04:23 PM
  5. split data into multiple workbooks with 3 conditions.
    By malaionfun in forum Excel Help
    Replies: 5
    Last Post: 05-11-2012, 11:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •