+ Reply to Thread
Results 1 to 4 of 4

force a user to fill a certain cell

  1. #1
    Registered User
    Join Date
    03-21-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    force a user to fill a certain cell

    Hello
    I started a validation of an excel sheets, have some questions:
    1. how can I force a user to fill a certain cell - say to introduce his name of some form number before he wants to print or before he wants to save?
    2. Can I leave only a small part of a sheet existing making disappear all the rest? Lets say I need to validate a sheet and I decided to check during the validation every cell in it (not the risk managment approach), can I leave only a part of it an an excell sheet (like a word documents - which contains 1 or 5 or 20 pages - a final number of cells, let's say a rectangle A-G, 1-30

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: force a user to fill a certain cell

    Starting with your second question. You can unlock only certain cells and not allow anyone without the password to enter values into others (or even to select others). You could also hide all unused rows and columns. With either technique, you would "Protect the worksheet"

    The best way to achieve the first part is using VBA (programming code) to check to see if a cell is empty before printing and if it is, cancel printing and output a message to fill in the cell. Is that what you are looking to do? This will only work if Macros are enabled, however.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    03-21-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: force a user to fill a certain cell

    Dear Chemist B,
    The worksheet protection in all different levels is learned and done. I wounder if I can make my sheet as a finite document, like a word document. You have mentioned hiding rows, can I leave 30 rows of my sheet and hide all the rest, then lock it?

    Regarding the other question - I use those sheets for a simle calculations in a pharmaceutical field company, Validation of excel is a new thing that we implement, to be able to use excel. Validation a VBA code would be more complicated. Can I force user to fill in the cell without VBA? may be with some "if.." simple thing? Could you suggest something particular?
    Thank you
    Fanny

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: force a user to fill a certain cell

    Q1. Yes, Click on the row number after your last row (i.e. 31) thus highlighting that row. Use CNTRL SHFT Down Arrow to select remaining rows. Right click and "Hide" The same can be done with columns using the Right Arrow.

    Q2. You can use "Data Validation" but if the user pastes the value in rather than manually entering it, the data validation disappears. Let me know if you want that explained. For the VBA, you'll want to copy the below code into your workbook module and modify it for your data.
    Please Login or Register  to view this content.
    Change the worksheets name and the range to match your data.
    To paste into workbook module
    ALT + F11 to enter VBA Editor
    You should see a folder like window on the left with your worksheets and a folder called "ThisWorkbook." Double click on "ThisWorkbook".
    Paste the code into the white text window on the right. Close the VBA editor (no need to save, it will save with the workbook)
    Did that help?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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