+ Reply to Thread
Results 1 to 21 of 21

Help request to add automatic dv in target row

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Help request to add automatic dv in target row

    Hi friends,

    I want to create a dynamic dv on ‘Data’ sheet. The list for dv list is on ‘Support’ sheet. I have created the names in name manager. I want to create/add dv in the target row if the user enters a inward number in column ‘B’ from row 2. I have a code in sheet module of ‘Sheet2’ for your kind perusal which creates a auto dv in cell ‘D1’ and indirect dv in cell ‘E1’. I want to modify/amend it to meet my requirements as follows:

    If the user enters a inward number in column then …
    Add dv in target row column ‘D’ for ‘Item’
    Add indirect dv in target row column ‘E’ for ‘Particulars’
    Add dv in target row column ‘F’ for ‘Designation’
    Add dv in target row column ‘J’ for ‘Mode of payment’
    Add dv in column ‘M’ for ‘Name of bank’

    If the user deletes the inward number in column ‘B’ then …
    Clear these dv in target row

    I request you experts to assist me to achieve the target positively.

    Any help will be highly appreciated.

    Thanking you in anticipation.
    Attached Files Attached Files
    Sincerely,

    mso3

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: Help request to add automatic dv in target row

    Hi,

    I only have time right now to direct help regarding the "Add indirect dv in target row column ‘E’ for ‘Particulars’".

    This website will show you how.

    http://www.contextures.com/xlDataVal02.html

    Cheers

  3. #3
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help request to add automatic dv in target row

    Hi,

    Thank you. I had gone through the link you provided but found no solution. I have no problem in creating dv list manually. I don’t want to add dv list unnecessarily to the entire range of database; for ex. If the range of dv column is from B2:B5000 then there is a dv list for the entire range though most of the rows are not used for data entry, no any entry in that row. I want to avoide it using target row so that there will not be the dv list for the entire range. So I request you to suggest me the vba code for sheet module.

    Thanking you,

  4. #4
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help request to add automatic dv in target row

    Post deleted.
    Last edited by mso3; 02-25-2017 at 01:34 PM.

  5. #5
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help request to add automatic dv in target row

    Hi,

    Greetings from me!

    I have amended the code as follows:
    Please Login or Register  to view this content.
    I'm not getting indirect dv list in column 'E'.
    If the user deletes the value in column 'B' then I want to clear all dv in target row.
    Thanking you.

  6. #6
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Help request to add automatic dv in target row

    HI mso,

    1. if user delete the value in column B then you want to delete complete row it self or just respective column (target row) value which has dv that cell you want to delete
    2. if user delete try to delete multiple value from column B then we need to write loop to delete dv
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  7. #7
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help request to add automatic dv in target row

    Hi Naveed,

    Greetings from me!

    Thank you. I have amended the code in the attached workbook.

    If the user deletes the inward number in column ‘B’ then I want to delete validation and contents of target row range ‘C:V’ respectively. I tried to do it but inn vain.

    The second main problem is that I’m not getting indirect dv list in column ‘E’. It’s referring the second row ‘$D2’ of column ‘D’ only in all rows.

    Thanking you,
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Help request to add automatic dv in target row

    Hi Mso3

    did you get any solution ? if not will post the solution in next couple of hours as currently i am working on monthly report.

  9. #9
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help request to add automatic dv in target row

    Hi Naveed,

    First of all I by heart appreciate you for your concern about my problem.
    No, I tried my level best to solve the problem but in vain. I amended the code but getting run-time error 1004 application-defined or object-defined error for the dv of column ‘E’.

    Since last 2-3 days I’m working on it but no success. I’m optimistic to receive a positive concrete solution from you soon. Please see the attached workbook for amended code.

    Thank you and have a nice time.
    Attached Files Attached Files

  10. #10
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Help request to add automatic dv in target row

    Hi Mso3

    need small clarification, if user delete any one value from these columns (desgination, MOP & Name of bank) then validation plus value need to delete or nothing should happen

  11. #11
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Help request to add automatic dv in target row

    Hi Mso,

    please find attached file and let us know is it what you are looking for and hope this will work perfectly
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help request to add automatic dv in target row

    Hi Naveed,

    Excellent! Thank you. Now the indirect dv is working fine. To complete the project I require little amendments in the code as follows:

    There is another code in sheet module. I have used ‘option explicit’ there. After adding this code to it I’m getting error ‘variable not define’. Can we define the variable to avoide this error?

    I’m not getting warning message ‘Please Enter valid Inward number’ if without entering the inward number in column the user start entering in range ‘c:v’.

    If there is no inward number then the user should not enter anything in range ‘c:v’. Here I require a warning message which you have set but it’s not working.

    If there is a inward number in column ‘B’ then the user can edit the range ‘c:v’ but can’t delete anything. If he want to delete anything in range row then he has to delete the inward number so that the entire range ‘b:v’ will be deleted.

    If the user deletes the inward number in column then I require a warning message ‘Do you want to delete the entry?’ if yes then delete; if no then exit sub. I have set it at the end of the code in my attached workbook post9.

    Everything else is fine.

    Thank you.

  13. #13
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Help request to add automatic dv in target row

    HI mso

    okay , let me check these

    please allow me some time i will look for these

  14. #14
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Help request to add automatic dv in target row

    Hi Mso,

    please find updated version of file and let me know
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help request to add automatic dv in target row

    Hi Naveed,

    Good morning!

    Thank you for updated version. Now some of the problems are solved but still need little amendments as follows:

    If the user deletes a inward number in column ‘B’ then I require a warning message to prevent accidentally deletion of entry as follows:
    Please Login or Register  to view this content.
    If the user changed the value in dropdown list in column ‘D’ then the value in column ‘E’ should be deleted to avoide mismatch. Otherwise there will be color in column ‘D’ and name of flower in column ‘E’ for example.

    If there is a inward number in column ‘B’ then the user is not allowed to delete the data in range ‘c:v’ only; now it’s beyond the range. I don’t want it from column ‘W’ onward because there is another data in my original workbook. Please restrict it till column ‘v’.

    If the user overwrites the inward number in column ‘B’ then I require a warning message as follows:
    “Do you want to overwrite the inward number?” Yes/No
    If ‘Yes’ then delete entire range ‘B:V’
    If ‘No’ then undo exit the sub.
    It will prevent accidental deletion of entry.

    For variable problem I set the variable as follows:
    Please Login or Register  to view this content.
    What does ‘tn’ refer? Is it correct?
    It solved the variable not defined problem.

    Everything else is perfect as per requirement. I appreciate you for taking trouble to solve the problem. After these amendments the project will be completed today.

    Sorry for trouble.

    Thank you and have a nice day.
    Last edited by mso3; 02-27-2017 at 09:59 PM.

  16. #16
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Help request to add automatic dv in target row

    HI mso,

    if user try to enter existing inward number then you want pop up right "inward already exists do you want to enter overwrite , yes/no" if user click on yes then previous existing entry should be delete (entire row) right or if user click on No then user not able to enter new value.

    is it correct ?

  17. #17
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help request to add automatic dv in target row

    Hi Naveed,

    No, I don't mean duplicate entry restriction. I have already a code to prevent inward number in column. So that the user can't enter a duplicate inward number.

    I mean ..
    Suppose the user entered 123 inward number and next time if he tries to enter a different inward number on the same row then I require a warning message mentioned my post to prevent mistaken deletion of previous entry.

    if the user enter the next entry of inward number 125 on the same row inward number 123 then I require a warning message if the user really wants to overwrite the entry or it's his mistake he is overwriting previous entry.

  18. #18
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Help request to add automatic dv in target row

    Hi mso,

    please find attached final version of file.

    i have implemented all the requirement , please have test and let me know
    Attached Files Attached Files

  19. #19
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help request to add automatic dv in target row

    Hi Naveed,

    Excellent! Now this version is perfect. I appreciate you for the same.

    I require input message, error alert message, error title in the dv.
    I have shown the require output for example for the Item column ‘D’. Likewise for each validation I will add the input message.
    Thank you.
    Attached Files Attached Files

  20. #20
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Help request to add automatic dv in target row

    Hi mso3,

    please find attached updated file
    Attached Files Attached Files

  21. #21
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help request to add automatic dv in target row

    Hi Naveed,

    Excellent! I appreciate you for your kind cooperation to solve the problem. Now it’s 100% perfect as per the requirement.

    Wish you best of luck.

    Thank you and good night.

+ 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. [SOLVED] Help request to keep date and remark if there is a value in column target cell
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2017, 06:22 AM
  2. Automatic Goal Seek That References Cell For Target Value
    By Navigator16171 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-23-2016, 05:52 AM
  3. Replies: 2
    Last Post: 11-07-2015, 05:29 PM
  4. Equation for automatic distribution with target setting
    By roshaero in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-12-2015, 11:33 AM
  5. [SOLVED] Request help in automatic registration code
    By hazem122 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-21-2012, 01:44 PM
  6. Replies: 5
    Last Post: 06-04-2012, 04:56 AM
  7. Automatic Target adjustment
    By TheRetroChief in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-03-2008, 12:27 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