Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a survey, some questions are Yes/No and some questions have multiple
choice answers that are assigned different point values. In analyzing the answers, I want to be able to type in the answer (ie, Yes/No or choice a or choice a and b and have Excel assign a point value depending on the answer. (ie, If I type in Yes, then hit Enter, I want the cell to have a "1" in it.) Is that possible? Mike |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the Change event of the worksheet and use if statements to handle
it if lcase(target.value)="yes" then target.value=1 etc |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your help Aidan, and I had additional questions to follow-up on
your email.....Mike 1. I have not used "Change Event" of the worksheet? What does that do and what are the steps to implement it? 2.What does the "lcase" represent? Is it question specific? How does the conditional formula reference the question number? (ie, if q1(target.value)="yes" then target.value=1 (is that how I would write it?) " wrote: Use the Change event of the worksheet and use if statements to handle it if lcase(target.value)="yes" then target.value=1 etc |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
1 - If you look at the visual basic editor, you can see at the top of
the right hand side a box which may well say GENERAL to start with - changing this to worksheet will allow you to see the events of the workbook - these are things like open, change etc - so you can trigger a macro when this event happens - obviously in your case, you want to run something when a cell changes - in this case it's not important WHICH cell, but you can pick that up with this event as well 2 - lcase turns the text into lower case - I've done this as YES, yes, Yes and yES all read the same to you, but don't to VBA - so we can cater for any form of the letters Y E S without spaces by turning the value into a lower (or upper!) case string. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Assign Values to array | Excel Discussion (Misc queries) | |||
Need set up template/function in Excel to gather survey answers | Excel Worksheet Functions | |||
Assign values to text | Excel Worksheet Functions | |||
Pivot Table for survey results with set of possible answers in PT's Rows Field? | Excel Discussion (Misc queries) | |||
How do I assign values to an array? | Excel Programming |