Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am having trouble trying to figure this one out:
I am having customers fill out a form for me in excel, and am running into issues with the data they are inputting. I think the best way to correct this would be to restrict the fields that they can edit. For instance: If a customer chose 'BI' from the drop down menu in column A, I want him/her to be able to edit the neighboring cell in column B. Either by having Column B hidden naturally, and only shown when 'BI' is selected, or have it shown but can only be edited when 'BI' is selected. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I wrote the code below recently to do something similar... you could
tweak it to either lock or hide selected cells / columns based on the user's input. In summary, whenever the date in C12 is changed, the code determines whether the change was in the 1st, 2nd or after the 2nd qtr and clears and (un)locks the input cells accordingly. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$C$12" Then If Range("c12").Value < DateSerial(2008, 4, 1) Then ActiveSheet.Unprotect ' MsgBox "1st q" Range("c17").ClearContents Range("c17").Locked = True Range("c23").ClearContents Range("c23").Locked = True ActiveSheet.Protect ElseIf Range("c12").Value < DateSerial(2008, 7, 1) Then ' MsgBox "2nd q" ActiveSheet.Unprotect Range("c17").ClearContents Range("c17").Locked = False Range("c23").ClearContents Range("c23").Locked = True ActiveSheet.Protect Else ' MsgBox "3rd or 4th q" ActiveSheet.Unprotect Range("c17").ClearContents Range("c17").Locked = False Range("c23").ClearContents Range("c23").Locked = False ActiveSheet.Protect End If End If End Sub On Jul 23, 8:41*am, Shawn Conn wrote: I am having trouble trying to figure this one out: I am having customers fill out a form for me in excel, and am running into issues with the data they are inputting. I think the best way to correct this would be to restrict the fields that they can edit. For instance: If a customer chose 'BI' from the drop down menu in column A, I want him/her to be able to edit the neighboring cell in column B. Either by having Column B hidden naturally, and only shown when 'BI' is selected, or have it shown but can only be edited when 'BI' is selected. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
display a conditional format in a range from another column | Excel Discussion (Misc queries) | |||
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look | Excel Discussion (Misc queries) | |||
Display missing Part Number if Column A does not match column B | Excel Worksheet Functions | |||
Conditional Display | Excel Worksheet Functions | |||
Conditional Formatting that will display conditional data | Excel Worksheet Functions |