559 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Conditions in Visual Basic for Applications - IF and SELECT CASE Part one of a three-part series of blogs |
---|
This part of the Excel VBA training series of blogs shows how to use IF / ELSE / END IF within VBA, and also how to use the alternative SELECT / CASE syntax within macros.
This series of blogs is part of our Excel VBA online tutorial. Alternatively, why not have a look at our Excel courses or VBA training?
|
At the heart of programming is the ability to test a condition. You can do this in Excel with a simple IF function:
A simple IF function, testing whether Olly the Owl is underpaid or not
In Excel VBA you also write conditions using the word IF, but the syntax is more flexible and is - usually - split over different lines. This blog shows how to use the IF / ELSE / END IF syntax followed by the alternative SELECT CASE syntax.
For all but the simplest conditions the SELECT CASE format will give code which is easier to write, comment and understand.
Let's start, then, with the simple IF condition!
Parts of this blog |
---|
|
Some other pages relevant to the above blogs include:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2023. All Rights Reserved.