Тёмный

Excel VBA Introduction Part 54.2 - The Switch Function 

WiseOwlTutorials
Подписаться 208 тыс.
Просмотров 16 тыс.
50% 1

If you'd like to help fund Wise Owl's conversion of tea and biscuits into quality training videos, you can click this link www.wiseowl.co.uk/donate?t=1 to make a donation. Thanks for watching!
You can buy our Introduction to Excel VBA book here www.lulu.com/shop/andrew-goul...
By Andrew Gould
Download files here www.wiseowl.co.uk/videos/exce...
www.wiseowl.co.uk - The Switch function allows you to perform multiple logical tests in a single, succinct expression in VBA. For simple conditions, you can use Switch as an elegant replacement for long-winded Select Case statements. This video shows how the Switch function works, inluding how to use it to create a user-defined function to help separate a list of data into different sheets.
Visit www.wiseowl.co.uk for more online training resources in Microsoft Excel, SQL Server, Reporting Services, Analysis Services, Integration Services, ASP.NET, C#, Visual Basic, Microsoft Access, Microsoft PowerPoint, Microsoft Word, Microsoft Project, Microsoft Publisher, Microsoft Visio and more

Опубликовано:

 

5 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@deninsrmic4165
@deninsrmic4165 Год назад
Brilliant tutorial Andrew, your last example which took half of the video blow my mind indeed. In the beginning, I was only interested in switch function as was getting acquainted with it, but your example creating sheets and adding array names to them was a master piece, and made me watch and follow along with the tutorial. It took me little bit time to to get behind the logic in some pieces of code but I contrived in it. Thank you sharing all that knowledge with us. 👍
@WiseOwlTutorials
@WiseOwlTutorials Год назад
Thank you Denin! Happy to hear that you enjoyed that one and persevered to work through the difficult parts! Thanks for watching!
@TonyDiaz.
@TonyDiaz. 7 лет назад
Hi Andrew, just finished watching the Iif function video and this one and let me tell you: I've always took for granted these couple of useful little functions. Thanks so much for the insight, I'll use these little friends more often. The following tip is for the users, in case they get a runtime error. There's a little hiccup with the Range("A2", range("A1").end(xldown)) function; I've always ran into a runtime error when I used it in a function, the VLookup function would be one of those examples. Always wanted me to have that worksheet active. Instead of that, what I do is create a variable that holds the last row, something like lrow=Sheet1.Range("A" & rows.count).end(xlup).row (if I want to start my range selection from a specific row, and data is not present, I would either sum lrow or just do a quick if lrow=2 then lrow=3, and this will ensure you don't affect your headers when you don't have data) Then, on the actual range of cells I would go for something like: Sheet1.Range("A3:L" & lrow).select for example. And the best thing is that you don't have to have that sheet active to work . Hope you found the little tip useful. :) Thanks man!
@MrCardeso
@MrCardeso 7 лет назад
Great video! Thanks!
@krn14242
@krn14242 7 лет назад
Thanks Andrew.
@vikramsharma7071
@vikramsharma7071 4 года назад
Very very useful sir...plzz keep doing it.
@isabellat7951
@isabellat7951 7 лет назад
I recently stumbled across WiseOwl Training videos on RU-vid and they are wonderful especially VBA!. I was looking specifically for how to create a 9-grid in excel for succession planning. Where can I find how to make one or the specific lessons to pull together to create. I am making my way through the courses but wanted to know if you all have what I am looking for. I welcome any suggestions or advise that you may have. Best Regards
@atifsaeed1692
@atifsaeed1692 7 лет назад
Mr. WiseOwl, I am trying to develop and application which shall collect all output results from an analysis software and process it for my further processing. I already made three macro-powered workbooks, which are working independently (and contain data of beams, columns and foundations separately). Now I am making a comprehensive application which call all these workbooks time to time as per requirement and make a final schedule of each item. The problem, I am facing now is, that the worksheets to be opened contain macros, and need approval of user because of his settings. Can I open these worksheets with some command or I have to shift the code of these worksheets in to my new application and make them macro-free and then open?
@sheikhwasiualhasib4517
@sheikhwasiualhasib4517 7 лет назад
This topics looks hard to me, because some of the terms don't know. Such as ByVal, ByRef,array. Please give me a link for those term or after giving lecture on those term put this video next. That will be more understandable. Overall this is good video tutorial.
@danashby1736
@danashby1736 7 лет назад
Hi Andrew, Hey one thing I'm personally struggling with at the moment is the Object Browser in VBA. I'm trying to interact with other programs that don't have much if any supporting documentation on the syntax needed to do achieve what I'm looking for. There also seems to be a lack of cogent videos on this on RU-vid. Would you consider doing a dedicated tutorial on this at some point? Cheers! Dan
@danashby1736
@danashby1736 7 лет назад
Yeah ok cheers. I looked in to it a little and I think you're right; the object browser doesn't appear to give enough info to reverse-engineer syntax. But a video on the object browser would probably still be generally helpful to the community though, as like I say it seems to be only minimally covered by others. The analysis software I'm working with is called Larsa 4D - it's a specialized structural finite element software for bridge analysis. The tech support is responsive to queries about how to achieve specific things with it in VBA, but obviously it's not ideal having to repeatedly email back and forth during development - would be nice to just have a full manual and run with it. Anyway, I appreciate the response. Keep up the good work :)
@vibhaykumar9274
@vibhaykumar9274 7 лет назад
May u upload the access video (all tutorial)
@ExactProBi
@ExactProBi 7 лет назад
amazing video as always, could you please make a tutorial on Progress Bar display when running a code? please make few examples of different codes in it !
@ExactProBi
@ExactProBi 7 лет назад
Thank you, I have just made donation, you should consider making all your course (as on your website) online as well, so people around the globe can make benefit from it
@Tat-cx1lr
@Tat-cx1lr 7 лет назад
Bonjour bravo encore pour vos vidéos. Une question qui n'a rien à voir avec cette vidéo: quel est l'inconvénient d'enregistrer un fichier Excel sous format XLB.Merci