+ Reply to Thread
Results 1 to 8 of 8

Drop down list does not work same as type

  1. #1
    Registered User
    Join Date
    06-20-2013
    Location
    India, Pune
    MS-Off Ver
    Excel 2003
    Posts
    6

    Drop down list does not work same as type

    Hello,
    I am tring to write a code to change color of cell when cell values matches perticular value.
    Attached is the test file.
    When cell value of B1 becomes "1" color changes to red.
    The code works well if I type in cell B1.
    When I use drop down list (Data/Validation/List) it doesn't work.

    PLease help me.

    Regards,
    SWapnil
    Attached Files Attached Files

  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,938

    Re: Drop down list does not work same as type

    That cell does not contain any DV.

    1. highlight B1
    2. on the home tab, styles, select CF
    3. select new rule, select "format only cells that contain"
    4. Cell value...equals 1 format fill red

    This will work for DV or manyal entry
    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 Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Drop down list does not work same as type

    Hi swapnil-kupwade

    Use Conditional Formatting on that Cell.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    07-15-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Drop down list does not work same as type

    Sorry wrong post
    Last edited by arunm1008; 08-25-2013 at 05:51 PM. Reason: sorry wrong post

  5. #5
    Registered User
    Join Date
    07-15-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Drop down list does not work same as type

    Hi Swapnil,In your code, remove Auto_open and On entry, Instead add the following code in Worksheet_Change for Sheet1

    Private Sub Worksheet_Change(ByVal Target As Range)
    KeyCells = "A1:B2"
    If Not Application.Intersect(Target, Range(KeyCells)) _
    Is Nothing Then KeyCellsChanged
    End Sub

  6. #6
    Registered User
    Join Date
    06-20-2013
    Location
    India, Pune
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Drop down list does not work same as type

    Thanks for reply,
    I think problem was not well described. I want code should run when cell value is selected using drop down list.( Reason being in original case there will be a secentance of 20 to 30 letters.)

    You will understand if you do below two cases.
    First type "a" in cell B1.

    Case 1) Type "1" in cell B1. Result will be cell colour changes to Red.
    Case 2) Select cell B1 vaule from drop down list as "1". Result will be no change in color.

    Use attached workbook.


    Regards,
    SWapnil
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-15-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Drop down list does not work same as type

    Hi Swapnil, I believe I had understood just the way you have redescribed it now. It is to trigger the code when a different value is selected that I was suggesting to move this event to the Worksheet_change event. I have also tested it what I suggested. Pls try it out. OnEntry does not trigger when different value is selected from list in B1, but Worksheet_change will trigger.
    Arun

  8. #8
    Registered User
    Join Date
    06-20-2013
    Location
    India, Pune
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Drop down list does not work same as type

    Hi arunm1008,
    If you have tried & it is working, please upload the excel sheet. I have tried but didn't understand exactly what to delete.

    Sorry i couldn't reply earlier.

    SWapnil

  9. #9
    Registered User
    Join Date
    07-15-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Drop down list does not work same as type

    Hi Swapnil, here you go, am attaching your excel workbook modified with my changes-Arun
    Attached Files Attached Files

+ 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. Drop Down list to make it act when type in any letter
    By Alexb77 in forum Excel General
    Replies: 4
    Last Post: 10-09-2013, 06:02 PM
  2. Drop down list that narrows as you type
    By penguintar in forum Excel General
    Replies: 1
    Last Post: 11-16-2011, 09:20 AM
  3. Drop down combo box list on type
    By sick stigma in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2009, 09:12 AM
  4. How to type to select something in a Drop down list?
    By Djanvk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-07-2008, 12:56 AM
  5. [SOLVED] No drop down list type-ahead?
    By Launen in forum Excel General
    Replies: 2
    Last Post: 10-18-2005, 01:05 PM

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