Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign Values to array Jeff Excel Discussion (Misc queries) 14 July 15th 08 06:06 PM
Need set up template/function in Excel to gather survey answers MSCraven Excel Worksheet Functions 1 August 13th 06 03:45 AM
Assign values to text Town of Exeter Excel Worksheet Functions 0 August 17th 05 01:47 PM
Pivot Table for survey results with set of possible answers in PT's Rows Field? [email protected] Excel Discussion (Misc queries) 0 May 16th 05 10:35 PM
How do I assign values to an array? Skyway[_2_] Excel Programming 14 February 29th 04 01:22 AM


All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"