ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automatically fill a cell with predetermined (https://www.excelbanter.com/excel-programming/287742-automatically-fill-cell-predetermined.html)

John[_72_]

Automatically fill a cell with predetermined
 
Using Excel2000
I am setting up a survey with questions in column A
and responses in columns B & C.
Column B is for Yes, & column C is for NO

Is there any way to have the responses automatically put in the cells
when the user clicks on the appropriate cell.

i.e.
COLUMN A COLUMN B COLUMN C
Question1 Yes
Question2 No
Question3 Yes
Question4 Yes

I would like the responses automatically put in the cell just
by clicking in the cell.
Is this possible.

P.S. The questionaire is more complex that just yes or no,
but this gives the gist of what I am tryin to achieve.





Don Guillett[_4_]

Automatically fill a cell with predetermined
 
right click sheet tabview codecopy/paste thissave workbook.
Works for row 4 on down

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row 3 Then
If Target.Column = 2 Then Target = "Yes"
If Target.Column = 3 Then Target = "No"
End If
End Sub

--
Don Guillett
SalesAid Software

"John" wrote in message
...
Using Excel2000
I am setting up a survey with questions in column A
and responses in columns B & C.
Column B is for Yes, & column C is for NO

Is there any way to have the responses automatically put in the cells
when the user clicks on the appropriate cell.

i.e.
COLUMN A COLUMN B COLUMN C
Question1 Yes
Question2 No
Question3 Yes
Question4 Yes

I would like the responses automatically put in the cell just
by clicking in the cell.
Is this possible.

P.S. The questionaire is more complex that just yes or no,
but this gives the gist of what I am tryin to achieve.







Don Guillett[_4_]

Automatically fill a cell with predetermined
 
BTW, you could even have this in the same column by using a single click for
no and a double click for yes.

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
right click sheet tabview codecopy/paste thissave workbook.
Works for row 4 on down

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row 3 Then
If Target.Column = 2 Then Target = "Yes"
If Target.Column = 3 Then Target = "No"
End If
End Sub

--
Don Guillett
SalesAid Software

"John" wrote in message
...
Using Excel2000
I am setting up a survey with questions in column A
and responses in columns B & C.
Column B is for Yes, & column C is for NO

Is there any way to have the responses automatically put in the cells
when the user clicks on the appropriate cell.

i.e.
COLUMN A COLUMN B COLUMN C
Question1 Yes
Question2 No
Question3 Yes
Question4 Yes

I would like the responses automatically put in the cell just
by clicking in the cell.
Is this possible.

P.S. The questionaire is more complex that just yes or no,
but this gives the gist of what I am tryin to achieve.









John[_72_]

Automatically fill a cell with predetermined
 
Thanks so much Don,
You presumed my next question,
if I wanted to set the single click to the respnse = Yes
and the double click to "" or blank to compensate for user error
where is the single click or double click property.
I don't see it anywhere in the puldown for the porperties.

Again thanks for the quick response.
Brad

"Don Guillett" wrote in message
...
BTW, you could even have this in the same column by using a single click

for
no and a double click for yes.

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
right click sheet tabview codecopy/paste thissave workbook.
Works for row 4 on down

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row 3 Then
If Target.Column = 2 Then Target = "Yes"
If Target.Column = 3 Then Target = "No"
End If
End Sub

--
Don Guillett
SalesAid Software

"John" wrote in message
...
Using Excel2000
I am setting up a survey with questions in column A
and responses in columns B & C.
Column B is for Yes, & column C is for NO

Is there any way to have the responses automatically put in the cells
when the user clicks on the appropriate cell.

i.e.
COLUMN A COLUMN B COLUMN C
Question1 Yes
Question2 No
Question3 Yes
Question4 Yes

I would like the responses automatically put in the cell just
by clicking in the cell.
Is this possible.

P.S. The questionaire is more complex that just yes or no,
but this gives the gist of what I am tryin to achieve.











John[_72_]

Automatically fill a cell with predetermined
 
I found it...
I was looking for simply On Click or On Double Click
I'm used to using Access....
Anyway this should work nicely.
Thanks again Don

"Don Guillett" wrote in message
...
BTW, you could even have this in the same column by using a single click

for
no and a double click for yes.

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
right click sheet tabview codecopy/paste thissave workbook.
Works for row 4 on down

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row 3 Then
If Target.Column = 2 Then Target = "Yes"
If Target.Column = 3 Then Target = "No"
End If
End Sub

--
Don Guillett
SalesAid Software

"John" wrote in message
...
Using Excel2000
I am setting up a survey with questions in column A
and responses in columns B & C.
Column B is for Yes, & column C is for NO

Is there any way to have the responses automatically put in the cells
when the user clicks on the appropriate cell.

i.e.
COLUMN A COLUMN B COLUMN C
Question1 Yes
Question2 No
Question3 Yes
Question4 Yes

I would like the responses automatically put in the cell just
by clicking in the cell.
Is this possible.

P.S. The questionaire is more complex that just yes or no,
but this gives the gist of what I am tryin to achieve.











Don Guillett[_4_]

Automatically fill a cell with predetermined
 
glad to help

--
Don Guillett
SalesAid Software

"John" wrote in message
...
I found it...
I was looking for simply On Click or On Double Click
I'm used to using Access....
Anyway this should work nicely.
Thanks again Don

"Don Guillett" wrote in message
...
BTW, you could even have this in the same column by using a single click

for
no and a double click for yes.

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
right click sheet tabview codecopy/paste thissave workbook.
Works for row 4 on down

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row 3 Then
If Target.Column = 2 Then Target = "Yes"
If Target.Column = 3 Then Target = "No"
End If
End Sub

--
Don Guillett
SalesAid Software

"John" wrote in message
...
Using Excel2000
I am setting up a survey with questions in column A
and responses in columns B & C.
Column B is for Yes, & column C is for NO

Is there any way to have the responses automatically put in the

cells
when the user clicks on the appropriate cell.

i.e.
COLUMN A COLUMN B COLUMN C
Question1 Yes
Question2 No
Question3 Yes
Question4 Yes

I would like the responses automatically put in the cell just
by clicking in the cell.
Is this possible.

P.S. The questionaire is more complex that just yes or no,
but this gives the gist of what I am tryin to achieve.













Mike Taylor

Automatically fill a cell with predetermined
 
Don,

Am interested in this thread. What code would result in having "this
in the same column by using a single click for no and a double click
for yes"? I can't seem to figure it out? TIA

Mike

"Don Guillett" wrote in message ...
BTW, you could even have this in the same column by using a single click for
no and a double click for yes.

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
right click sheet tabview codecopy/paste thissave workbook.
Works for row 4 on down

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row 3 Then
If Target.Column = 2 Then Target = "Yes"
If Target.Column = 3 Then Target = "No"
End If
End Sub

--
Don Guillett
SalesAid Software

"John" wrote in message
...
Using Excel2000
I am setting up a survey with questions in column A
and responses in columns B & C.
Column B is for Yes, & column C is for NO

Is there any way to have the responses automatically put in the cells
when the user clicks on the appropriate cell.

i.e.
COLUMN A COLUMN B COLUMN C
Question1 Yes
Question2 No
Question3 Yes
Question4 Yes

I would like the responses automatically put in the cell just
by clicking in the cell.
Is this possible.

P.S. The questionaire is more complex that just yes or no,
but this gives the gist of what I am tryin to achieve.







Rob van Gelder[_4_]

Automatically fill a cell with predetermined
 
You could do something like:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 2 Then Target.Value = "No"
End Sub

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Column = 2 Then
Target.Value = "Yes"
Cancel = True
End If
End Sub


But I prefer the RightClick method:

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Column = 2 Then
Select Case Target.Value
Case "No": Target.Value = "Yes"
Case Else: Target.Value = "No"
End Select
Cancel = True
End If
End Sub

Rob


"Mike Taylor" wrote in message
om...
Don,

Am interested in this thread. What code would result in having "this
in the same column by using a single click for no and a double click
for yes"? I can't seem to figure it out? TIA

Mike

"Don Guillett" wrote in message

...
BTW, you could even have this in the same column by using a single click

for
no and a double click for yes.

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
right click sheet tabview codecopy/paste thissave workbook.
Works for row 4 on down

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row 3 Then
If Target.Column = 2 Then Target = "Yes"
If Target.Column = 3 Then Target = "No"
End If
End Sub

--
Don Guillett
SalesAid Software

"John" wrote in message
...
Using Excel2000
I am setting up a survey with questions in column A
and responses in columns B & C.
Column B is for Yes, & column C is for NO

Is there any way to have the responses automatically put in the

cells
when the user clicks on the appropriate cell.

i.e.
COLUMN A COLUMN B COLUMN C
Question1 Yes
Question2 No
Question3 Yes
Question4 Yes

I would like the responses automatically put in the cell just
by clicking in the cell.
Is this possible.

P.S. The questionaire is more complex that just yes or no,
but this gives the gist of what I am tryin to achieve.










All times are GMT +1. The time now is 03:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com