Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel programming
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel programming
Hi Surya,
What you want to achieve is not really difficult to do with some VBA coding. But until you've some sort grasp of the excel object model and VBA, codes from others will only perplex you. If you're just starting out, I'd recommend you to go through some tutorials. This page has got links for everyone: http://www.mvps.org/dmcritchie/excel/excel.htm If you already know the basics, then ignore this post. someone will come along with the code. Good luck. ~Asif 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel programming
You can do this with a formula in column C
For example, in C2 =if(B2="","",if(B2=12,True,False)) You can also shorten it to =if(B2="","",if(B2=12,True)) -- Regards, Tom Ogilvy "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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel programming
Or even
=if(B2="","",B2=12) -- Best Regards Leo Heuser Excel MVP Followup to newsgroup only please. "Tom Ogilvy" skrev i en meddelelse ... You can do this with a formula in column C For example, in C2 =if(B2="","",if(B2=12,True,False)) You can also shorten it to =if(B2="","",if(B2=12,True)) -- Regards, Tom Ogilvy |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel programming
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Programming | Excel Discussion (Misc queries) | |||
Excel Programming | Excel Worksheet Functions | |||
Excel programming using VBA | Excel Programming | |||
how to programming Excel in C# | Excel Programming | |||
Excel Programming in VB | Excel Programming |