+ Reply to Thread
Results 1 to 8 of 8

Data Validation - Automating. Facing an issue

  1. #1
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2016
    Posts
    110

    Data Validation - Automating. Facing an issue

    Dear all,

    I'm currently trying to automate the process of creating Data Validation.

    PFA.

    I have Grades and Names List.

    " GradesList " Range has values "One, Two, Three, Four "

    I'm trying to map Names List to GradesList using INDIRECT().

    Debug the function DataValidation() to understand the issue better.

    I'm having a issues in the below code:

    Please Login or Register  to view this content.
    Please help.

    Thanks,
    Vinod Krishna
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data Validation - Automating. Facing an issue

    In D2 Cell - Array Formula - Requires CTRL+SHIFT+ENTER

    =IFERROR(INDEX($A$2:$A$7,MATCH(0,COUNTIF($D$1:D1,$A$2:$A$7),0)),"")

    In E2 Cell - Array Formula - Requires CTRL+SHIFT+ENTER

    =IFERROR(INDEX($B$2:$B$7,SMALL(IF($A$2:$A$7=$B$10,ROW($A$2:$A$7)-MIN(ROW($A$2:$A$7))+1),ROW(1:1))),"")

    Drag both the formula's until row 7

    Array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.

    In B10 DV List

    =OFFSET($D$2,,,SUMPRODUCT(1*($D$2:$D$7<>"")))

    In B11 DV List

    =OFFSET($E$2,,,SUMPRODUCT(1*($E$2:$E$7<>"")))

    Refer the attached file for details
    Attached Files Attached Files


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2016
    Posts
    110

    Re: Data Validation - Automating. Facing an issue

    Dear SixthSense,

    Appreciate your help with a Solution using Formulas.

    Forgot to mention that my data will always be dynamic and I would love do this via Macro as in my 1st post.

    Kindly let me know if this would be possible.

    Thanks,
    Vinod Krishna

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data Validation - Automating. Facing an issue

    Copy the below code and do right click on sheet tab and select view code and paste it.

    Close the VBA window (Alt+Q to close VBA window) and return to that sheet and check the dropdown cells.

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Data Validation - Automating. Facing an issue

    Pl see attached file.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 02-12-2014 at 05:58 AM.

  6. #6
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2016
    Posts
    110

    Re: Data Validation - Automating. Facing an issue

    Dear Sixthsense,

    Brilliant Coding Appreciate all your efforts.

    I tried to relate the above code with the real scenario in hand.

    I have named the Ranges and kept it ready.

    Challenging Situation:-
    Concerned data is spread across 3 sheets.

    PFA to understand my situation.

    I added little code. Finding it difficult to make all the necessary changes.

    Hope you can help

    Regards,
    Vinod Krishna
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2016
    Posts
    110

    Re: Data Validation - Automating. Facing an issue

    Quote Originally Posted by kvsrinivasamurthy View Post
    Pl see attached file.
    Hi Srinivas,

    Your solution seem simple. Appreciate it.

    PFA for the real scenario in hand.

    Challenging Situation:-
    * Concerned data is spread across 3 sheets.
    * Even Data Validation needs to done by code not manually

    Thanks,
    Vinod Krishna
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Data Validation - Automating. Facing an issue

    Things are not clear and the file attached does not contain any data. Give sample of details of data as available in your file along with the expected result.

+ 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. Facing "out of memory" issue while importing data from a .csv file to create Pivot Cache
    By SeriousDeveloper in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2013, 03:42 AM
  2. [SOLVED] Am Facing an Issue with Macro pasting to a particular Range
    By rajeeva in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-17-2013, 09:16 AM
  3. Facing issue with outlook 2010 Birthday email
    By akulka58 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-25-2013, 07:01 AM
  4. Replies: 3
    Last Post: 08-28-2012, 10:09 AM
  5. Automating data validation list change
    By Penguinhead in forum Excel General
    Replies: 6
    Last Post: 06-04-2012, 10:06 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