Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All! I am a struggling new user and probably not even close in the
proper way to use VB, so my apologies if my question makes you cringe! Here's what I have: Cell AH68 is connected to 3 radio buttons, which means AH68 will display a "0" if no buttons are selected "1" , "2", or "3" depending on which button is selected. The EXCEL Side: If AH68 = "0" or "1", a message appears in another cell (W66) stating "This information is required"; otherwise, if AH68 = "2" or "3", W66 states "N/A". MY GOAL: Since the date the sheet is closed is a catalyst for money to be collected, I have a cell (E74) which is the 'Date Closed' field. If W66 is blank or shows "This information is required", I want the Date Closed field (E74) to show "Required Information Missing" and NOT allow editing. If W66 has any other data in it, I want E74 to be editable. Below is what I came up with - the last line (before End If) is where I think I'm stuck. If anyone can help, I'd be very grateful! Thanks! Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) If Range("AH68").Value = "1" And Range("W66") = "This Information Is Required" Or Range("AH68").Value = "0" And Range("W66") = "This Information Is Required" Then Range("E74") = "Required Information Missing" ElseIf Range("AH68").Value "1" And Range("W66") < "This Information Is Required" Then Range("E74") = ??? I need it to be editable - this is where I'm stuck. End If End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range("E74") = ??? I need it to be editable - this is where I'm stuck
Not sure I completely understand, but maybe something like this: Range("E74") = InputBox("Cell E74 Requires a valid entry!", "VALID ENTRY REQUIRED") The InputBox will allow the user to make an entry in cell E74 without having to stop the macro. "Sal" wrote in message ... Hello All! I am a struggling new user and probably not even close in the proper way to use VB, so my apologies if my question makes you cringe! Here's what I have: Cell AH68 is connected to 3 radio buttons, which means AH68 will display a "0" if no buttons are selected "1" , "2", or "3" depending on which button is selected. The EXCEL Side: If AH68 = "0" or "1", a message appears in another cell (W66) stating "This information is required"; otherwise, if AH68 = "2" or "3", W66 states "N/A". MY GOAL: Since the date the sheet is closed is a catalyst for money to be collected, I have a cell (E74) which is the 'Date Closed' field. If W66 is blank or shows "This information is required", I want the Date Closed field (E74) to show "Required Information Missing" and NOT allow editing. If W66 has any other data in it, I want E74 to be editable. Below is what I came up with - the last line (before End If) is where I think I'm stuck. If anyone can help, I'd be very grateful! Thanks! Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) If Range("AH68").Value = "1" And Range("W66") = "This Information Is Required" Or Range("AH68").Value = "0" And Range("W66") = "This Information Is Required" Then Range("E74") = "Required Information Missing" ElseIf Range("AH68").Value "1" And Range("W66") < "This Information Is Required" Then Range("E74") = ??? I need it to be editable - this is where I'm stuck. End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How many conditions can I apply to a cell? I need to apply 8. | Excel Discussion (Misc queries) | |||
elseif | Excel Programming | |||
elseif | Excel Programming | |||
if then elseif on text file imported into excel | Excel Programming | |||
If...Elseif...End If | Excel Programming |