Conditional data entry WITHOUT using a Macro

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conditional data entry WITHOUT using a Macro

Post by HansV »

In the attached version, the worksheet has been protected with the same password as the workbook.
Users can only enter data in the unlocked cells; they cannot view the formulas.

Datasheet.xlsx
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

vilas desai
3StarLounger
Posts: 307
Joined: 16 Mar 2011, 09:33

Re: Conditional data entry WITHOUT using a Macro

Post by vilas desai »

This is truly great. I wonder what is that you dont know? I would have to spend a life time in researching this.
Thanks. Just wondering if we could block for editing ONLY those cells which have a data. That would be still
much better.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conditional data entry WITHOUT using a Macro

Post by HansV »

Do you mean that cells cannot be edited once they have been filled in? That would require VBA.
Best wishes,
Hans

vilas desai
3StarLounger
Posts: 307
Joined: 16 Mar 2011, 09:33

Re: Conditional data entry WITHOUT using a Macro

Post by vilas desai »

No Sir, I mean Cells which are already edited should be blocked from editing. Other cells can be editable multiple times.
None the less, its is perfectly good with the last two versions. Thanks again and best regards

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conditional data entry WITHOUT using a Macro

Post by HansV »

If you want to lock or unlock cells, you can easily do so yourself:
  1. Activate the Review tab of the ribbon.
  2. Click 'Unprotect Sheet'.
  3. Enter the password.
  4. Click OK.
  5. Select the cells that you want to lock or unlock.
  6. Press Ctrl+1 to activate the 'Format Cells' dialog.
  7. Activate the Protection tab.
  8. Depending on what you want, tick or clear the Locked check box.
  9. Enter the password.
  10. Click OK.
  11. Enter the password again.
  12. Click OK.
Best wishes,
Hans

vilas desai
3StarLounger
Posts: 307
Joined: 16 Mar 2011, 09:33

Re: Conditional data entry WITHOUT using a Macro

Post by vilas desai »

Hi Hans
I am adding one more option "Electronic" with the attached data. Please help with the revised file. Thanks in advance
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conditional data entry WITHOUT using a Macro

Post by HansV »

Here you go. Next time, try to apply changes yourself.

Datasheet.xlsx
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

Zauberkind
2StarLounger
Posts: 141
Joined: 21 Oct 2011, 10:08

Re: Conditional data entry WITHOUT using a Macro

Post by Zauberkind »

Hello Hans,
you have once again aroused my curiosity.
I downloaded the workbook (01 Sep 2021, 18:55) because I have a problem into which I was hoping this would give me some insight.
I cannot unhide the "comparisons" worksheet.
It does not appear to be protected, but when I try to set the .Visible property, I get 'Error 1004'.
I would like to ask how you did that, and how to get around it.
I hope I'm not asking you to reveal any trade secrets, bit if I am, you can consider the question moot.
TIA.
Regards,
Zk

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conditional data entry WITHOUT using a Macro

Post by HansV »

The workbook has been protected. You cannot hide or unhide worksheets in a protected workbook.
To unprotect the workbook, activate the Review tab of the ribbon. You'll notice that the 'Protect Workbook' button is highlighted.
Click it. You'll be prompted to enter the password. It is vilas (as mentioned on page 1 of this thread, so I'm not revealing a secret).
You'll then be able to unhide the comparisons sheet.
Best wishes,
Hans

Zauberkind
2StarLounger
Posts: 141
Joined: 21 Oct 2011, 10:08

Re: Conditional data entry WITHOUT using a Macro

Post by Zauberkind »

Thanks, Hans.
I looked at the 'Protect Workbook' button, but was fooled by its behaviour.
I expected it to read 'Unprotect Worksheet', analogous to the 'Protect Sheet' button.
My dumb!
Thanks again,
Zk.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conditional data entry WITHOUT using a Macro

Post by HansV »

The button to protect a worksheet alternates between captions "Protect Sheet" and "Unprotect Sheet"; the color remains the same.
The button to protect a workbook alternates between highlighted an unhighlighted; the caption remains the same.
This inconsistency has always irked me.
Best wishes,
Hans