![]() |
How do I assign point values on survey answers?
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 |
How do I assign point values on survey answers?
Use the Change event of the worksheet and use if statements to handle
it if lcase(target.value)="yes" then target.value=1 etc |
How do I assign point values on survey answers?
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 |
How do I assign point values on survey answers?
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. |
All times are GMT +1. The time now is 09:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com