Excel/Macros/Functions

Advertisement


Question
Hi Damon,

I need to create an auditing tool in EXCEL 2010. The tool will have a list of tier 1 questions and the answer to these questions will be Yes/No/Not Applicable. If "Yes" is answered for a particular question, then the tool will further ask more questions (tier 2) related to the original question. The new (tier 2) questions should appear nested/as a tree below the original (tier 1) question. If "No/Not Applicable" is answered to the original tier 1 question, then no action needs to be taken and the auditor moves to the next tier 1 question in the list.

I was thinking about some macro that gets activated when the user types "Yes" to the original tier 1 questions. However the macro should not activate when answering "Yes" to tier 2 questions.

Answer
Hello Snigdha,

What you describe does not require a macro.  However, it can be accomplished in many ways, including using macros and userforms.  But because you have only two tiers I believe the simplest way is to use cell formulas aided by a simple user-defined function which I call CASES.  It is a bit difficult to describe this method here, but if you would like to follow up with your email address I will send you a simple example that illustrates how to do this. Or you can email me at VBAexpert@myway.com and I will reply with the example.

Damon
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Damon Ostrander

Expertise

I have extensive experience with VBA programming in Excel 5 through Excel 2013. As a former aerospace engineer with a large aerospace corporation and consultant in a small defense technology services company, I have developed a wide range of applications in VBA, including simulations involving mixed-language programming, satellite orbit mechanics, graphics and animation, and real-time applications. I am interested in moderate to hard VBA-related questions only.

Experience

I have developed and taught several courses in Excel VBA programming and also VBA programming in Office 97, 2000, and 2007. I have developed a number of large technical applications in Excel VBA for use within the aerospace industry.

Education/Credentials
B.S. in Electrical Engineering and Computer Science, University of California, Berkeley.

©2016 About.com. All rights reserved.