RecordingIFInAMacro

RecordingIFInAMacro - depending on the result. Usually, a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
12/20/2011 195f13c9b4792699bc9b66e9ff369769f8602ae8.xls Macro IF test: Can an IF Function be Recorded? Test: Is C4 greater or less than C5? 15 25 Test with IF in sheet. Less Conclusion: For more information About the Excel worksheet functions that can be called in VBA the entry of the IF function in one of the usual ways. see VBA online help. (Note: IF is not included in the list of available functions.) However, if you want to use the result of the IF statement in macro processing, you must write that into the macro using the VBA editor. For example: If C4>C5 then choose one processing path else choose another. or False, and then specify one or more statements to run,
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: depending on the result. Usually, a condition is an expression that uses a comparison operator to compare one value or variable with another. Using conditional statements and looping statements (also called control structures), you can write Visual Basic code that makes decisions and repeats actions. Conditional & Looping Statements in VBA IfThenElse Select case DoLoop ForNext For EachNext You can include an IF test in a macro by recording Conditional statements evaluate whether a condition is True Run Test w/Macro...
View Full Document

This note was uploaded on 12/20/2011 for the course BUS 101 taught by Professor Ecklund during the Spring '01 term at Duke.

Ask a homework question - tutors are online