+ Reply to Thread
Results 1 to 9 of 9

Conditonal DropDown with IF condition

  1. #1
    Registered User
    Join Date
    09-19-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    8

    Conditonal DropDown with IF condition

    Hi Experts,

    This is my first post and before posting, I have searched the whole forum for this issue.

    The issue is as follows:

    Suppose A2 cell has value as "Yes" or "yes".
    So if A2 = "Yes" then
    B2 will have a drop down list of "Yes" and "No", so that user can select yes or no from the Drop-down list.
    But if the A2 cell has any values other than Yes/yes then
    B2 will show "N/A"

    Current workaround is:
    Please Login or Register  to view this content.
    Please help regarding the issue.

    Regards,
    Sap.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Conditonal DropDown with IF condition

    hi, saps19, VB option, try to change A2 cell value
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-19-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Conditonal DropDown with IF condition

    Quote Originally Posted by watersev View Post
    hi, saps19, VB option, try to change A2 cell value
    Thanks a lot.. this is what I wanted!

    can we do some more advance like locking and grey out the cell instead of N/A?
    Please Login or Register  to view this content.
    I'm really new to VB/Macro.

    I'm using MS 2007 excel
    Last edited by saps19; 09-19-2011 at 04:39 AM. Reason: Excel Vesrion

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Conditonal DropDown with IF condition

    grey out added, please check attachment, please specify what should be protected and when?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-19-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Conditonal DropDown with IF condition

    Quote Originally Posted by watersev View Post
    grey out added, please check attachment, please specify what should be protected and when?
    Thanks Water... I have already modified the code, please check below.
    Please Login or Register  to view this content.
    But this code works for only one cell. I want to run this macro in all the cells.

    Please find the attached excel sheet for details.
    According to "Worked?" option, the "Availed?" option will change.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Conditonal DropDown with IF condition

    please check attachment
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-19-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Conditonal DropDown with IF condition

    Quote Originally Posted by watersev View Post
    please check attachment
    Thanks for the help water... Now I'm able to run macro in alternate cells(Like A1, A4, A7 etc). Please find the below code and suggest if it needs any further modification / improvement.
    Please Login or Register  to view this content.
    However, I need to achieve the following two points:
    1. I don't want to run this macro after 10th row.
    2. The macro should start from my desired location(i.e: Suppose from B5 or C4 etc.).

    Please help me with this two point.

    Cheers,
    Sap.

  8. #8
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Conditonal DropDown with IF condition

    please check attachment, the code will work in any column if target (changed cell) is within 1:10 rows including
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    09-19-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Conditonal DropDown with IF condition

    Quote Originally Posted by watersev View Post
    please check attachment, the code will work in any column if target (changed cell) is within 1:10 rows including
    Thanks water... I tried to modify the codes. I have attached the excel sheet with some points.

    I want to run the macro in "Worked?" column only; the values in "Last date" and "Used date" will vary depend on the value of "Availed"(Yes/No) column. There will be a date calculation like this: =DATE(YEAR(C1),MONTH(C1), DAY(C1)+90) in "Last date" column. "Used date" column will have manual entry if "Availed" column has the value as "Yes", otherwise "Used Date" column will contain "N/A".

    Please help me with it accordingly.

    Cheers,
    Sap.
    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)

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