Hello Surya,
This can be done even without
VB.
First, write a formula in C that will evaluate if the answer is correct.
Assume that question and answer are in A1 and B1 respectively then write the
formula in C1 as =IF(B1="","",B1=12). If the correct answer is not number,
you must enclose it in quotation marks. i.e =IF(B1="","",B1="ABC").
Second, protect your worksheet. Select all the cells that user will use to
put their answers. In FormatCellsProtection Tab uncheck "locked". Now
select all the cells that you have put your formula. In
FormatCellsProtection Tab check "hidden" to prevent them in seeing the
correct answers. Perhaps, you already know that you need to go
ToolsProtectionProtect Sheet because if you have notice this is noted in
Format Cells Dialog box.
If you still wish to use
VB, sad to say I am only one of the ordinary guy.
But, if you just wait a while experts in this NG could help you.
Regards,
Jon-jon
"Surya" wrote in message
...
Hi,
I am new to programming and I would like to know how to
do some automation in MS-Excel.
For example in Column A I would type some questions for
which user need to answer in column B for each question.
When they answer a question and leaves the cell I should
be able to evaluate whether the answer is true or false
and display the same in Column C.
When user open the excel file user will be seeing only
question in column A, when he types in answer in Column B,
it has to evaluated and result has to be displayed in
column C
A B C
No. of Months in a Year 12 true
No. of weeks in a Year 2 false
Could someone help me out with an example or links to
help me know how to achieve this kind of requirement