Excel VBA Introduction Part 13 - If Statements

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ม.ค. 2025

ความคิดเห็น • 61

  • @maurocastagnera8949
    @maurocastagnera8949 7 ปีที่แล้ว +2

    Dear Andrew, I understand more in 17.54 minutes of your video than on half a day of theory of if statements, even though now it's 23.45 p.m.! Thanks for your excellent work!

  • @Worldslargestipod
    @Worldslargestipod 10 ปีที่แล้ว +28

    Without a doubt the best VBA tutorial on the internet.

    • @laokorngaudeamus7259
      @laokorngaudeamus7259 9 ปีที่แล้ว +1

      ***** seriously man, I use Lynda.com (a paid service) and find your tutorials significantly easier to understand as well as more interestingly presented.

  • @maurocastagnera8949
    @maurocastagnera8949 6 ปีที่แล้ว +2

    Now that I can better understand English language (even without subtitles), I'm covering your videos and I realize even more important details and I understand even more how smart you are and really an excellent teacher that every student should want to have ! Dear Andrew, you are really the best of all! 😊

  • @maurocastagnera8949
    @maurocastagnera8949 7 ปีที่แล้ว

    Simple and extremely clear, you can even easily explain things that seem complex. You have a great quality and that is to awake in those who are listening to an increasing interest in the subject you are dealing with. In a nutshell, learn the concepts even just for the joy and the taste of learning. Qualities that only the great teachers have! Thank you very much.

  • @maurocastagnera8949
    @maurocastagnera8949 6 ปีที่แล้ว +2

    Dear Andrew, your Knowledge about VBA is EPIC! You are the best on the web! 👏👏👏

  • @Tat-cx1lr
    @Tat-cx1lr 4 ปีที่แล้ว

    Encore merci. Vous méritez un Oscar YT. Amicalement.

  • @steinvanheirsele9275
    @steinvanheirsele9275 10 ปีที่แล้ว +2

    Give this guy a medal.... you're reducing my workload quit a bit.
    grtz from Belgium

  • @daniellako5337
    @daniellako5337 10 ปีที่แล้ว

    I've never thought that I will spend my weekend wathcing VBA tutorial, but it happened thanks to your work. Excellent quality, clear explanations, very well done!

  • @maurocastagnera8949
    @maurocastagnera8949 7 ปีที่แล้ว +2

    I can only say what was written in other comments, that is you are really the number one on the web for the VBA. I really appreciate your intelligence and your ability explaining things excellently! Thanks endless!

  • @grzegorzdabrowski5340
    @grzegorzdabrowski5340 10 ปีที่แล้ว +1

    The best tutorials I've ever seen. I am trying to learn VBA some time by myself and after watching your movies (12 already) a lot of aspects of VBA is now clear for me. Going to see all of them. Thanks a lot.

  • @imtiazulhaque6328
    @imtiazulhaque6328 8 ปีที่แล้ว

    Your tutorial videos are very comprehensive and very helpful for a beginner like me to learn VBA and developing Macros in excel . Thanks

  • @djram1072
    @djram1072 8 ปีที่แล้ว

    Dear Sir Andrew. The tutorials are just just excellent. I have started learning at one go. In fact I have started developing a few applications useful to my daily work. Thank you very much for sharing the knowledge.

  • @therightflavour
    @therightflavour 9 ปีที่แล้ว

    Hi Andrew
    I am absolutely loving your tutorials. I am learning a lot more than I bargained for. I already have an educational background in programming so I am basically using your tutorials to refresh my memory of VBA. I spiced up the code a bit including all that I have learned from your previous videos.
    Sub TestingFilmLength()
    Dim FilmLength As Integer
    Dim FilmDescription As String
    Dim FilmNameAddress As Range
    Set FilmNameAddress = Application.InputBox(Prompt:="Select The Film Name", Type:=8)
    FilmLength = FilmNameAddress.Offset(0, 2).Value
    If FilmLength < 100 Or Len(FilmNameAddress.Value) < 10 Then
    FilmDescription = "Short"
    Else
    If FilmLength < 120 And Len(FilmNameAddress.Value) < 15 Then
    FilmDescription = "Medium"
    Else
    FilmDescription = "Epic"
    End If
    End If
    MsgBox FilmNameAddress.Value & " is " & FilmDescription
    End Sub

  • @bcc9853
    @bcc9853 8 ปีที่แล้ว +4

    This video is clearly EPIC. Great series of videos, very informative and easy to follow. Thanks!

  • @manishmanhar3258
    @manishmanhar3258 9 ปีที่แล้ว +4

    Thank you so much for the tutorials. Your efforts are clearly visible.

  • @amandafernandesramospasson5862
    @amandafernandesramospasson5862 4 ปีที่แล้ว +1

    awesome! you made VBA a lot easier for me. thank you so much.

  • @bodacachanilla
    @bodacachanilla 10 ปีที่แล้ว

    The way you convey the information is excellent!! I found this very useful.

  • @portapere
    @portapere 11 ปีที่แล้ว

    Very nice tutorials Andrew. Thanks a lot from Barcelona. Practical and sistemathic. Just great :))

  • @naresh1010ful
    @naresh1010ful 4 ปีที่แล้ว

    initially i did had bit of confusion to combine inputbox and if, but when i went back to revised variable video, I resolved it. Followings are my learning

  • @anthonyaguirre6101
    @anthonyaguirre6101 7 ปีที่แล้ว

    Back in the game! Thanks Andrew!

  • @ml6352
    @ml6352 9 ปีที่แล้ว

    Hello Andrew, thanks for all these amazing videos! Extremely useful!!!

  • @tamoghnaacharyya7212
    @tamoghnaacharyya7212 11 ปีที่แล้ว

    Thanks Andrew !! learning VBA is fun with you :)

  • @tajsay
    @tajsay 5 ปีที่แล้ว +1

    thanks, Andrew for the wonderful explanation

    • @WiseOwlTutorials
      @WiseOwlTutorials  5 ปีที่แล้ว

      You're very welcome Sayyad, thank you for watching!

  • @Search4Knowledge
    @Search4Knowledge 8 ปีที่แล้ว +2

    Another well explained tutorial, God bless you.

  • @preetishamballi6988
    @preetishamballi6988 4 ปีที่แล้ว

    Hello WiseOwl,
    Thanks for the video,
    Only thing missing here is, If multiple conditions inside a If / Elseif conditions are true then, VBA executes first If / Elseif and exits If statement
    For Ex.
    Option Explicit
    Sub Run()
    Dim A As Long
    A = 10

    If A < 100 Then
    MsgBox "Less than 100"
    ElseIf A < 120 Then
    MsgBox "Less than 120"
    Else
    MsgBox "More than 120"
    End If

    End Sub
    VBA will show a message box saying "Less than 100"
    and exit when Elseif condition is also true.

  • @SantoshLoka
    @SantoshLoka 7 ปีที่แล้ว

    Its Becoming More Interesting i would like to make my own macros for my own workbook,i hope this macros will help me a lot..ty Guru for YR Valuable Videos

  • @kishorchettri4085
    @kishorchettri4085 7 ปีที่แล้ว

    One of the best tutorial.

  • @Tubedog8
    @Tubedog8 10 ปีที่แล้ว +1

    Excellent as usual. Thank You!

  • @nolaskoabreu9228
    @nolaskoabreu9228 6 ปีที่แล้ว

    You're God sent.

  • @naresh1010ful
    @naresh1010ful 4 ปีที่แล้ว

    Hello Sir, Good Morning :) I would like to share some of the findings which i have done.
    In addition to above if, i was able to use the if statement with Input box

  • @generationnext9000
    @generationnext9000 9 ปีที่แล้ว

    You are a great man.

  • @paraglide01
    @paraglide01 9 ปีที่แล้ว

    Thanks for the tutorials I have learned a lot. Question, if I want to check a cell in a closed workbook/file how can I do that?

  • @dbascb
    @dbascb 10 ปีที่แล้ว +1

    Excellent! Thank you

  • @TestingPyros
    @TestingPyros 10 ปีที่แล้ว

    Hello again. I have enjoyed these so far. This one is, again, excellent.
    But, I have a problem. I have an involved program that has input boxes. When "cancel" is pressed, the program doesn't end. I put in an "if" to call a cancel subroutine, but it still went back to the next call step. What is the best way to cancel a program while it's running?

    • @TestingPyros
      @TestingPyros 10 ปีที่แล้ว

      *****
      So THAT'S why it continued! Okay, I'll try this. Putting in "End" quit the entire program. Thanks!

  • @Globalpeaceseeker
    @Globalpeaceseeker 7 ปีที่แล้ว

    with the If condition in Vba is it possible to have one test and more than one result e.g if condition >1 then film description= "great", cells (5,10)= "great" (Sorry guys if this is a bad example but im still getting to grips with VbA but use it more and more in the workplace

  • @chenchenli6755
    @chenchenli6755 10 ปีที่แล้ว

    Very useful!thank you!!

  • @zeyadhassan7026
    @zeyadhassan7026 10 ปีที่แล้ว

    please, how can I use an if test on more than one cell at once? For example, if I have 100 cells and I want to write an if formula in all of them without entering the numbers of the cells one at a time. I need it very much. Many thanks in advance.

  • @amrgaber4662
    @amrgaber4662 7 ปีที่แล้ว +1

    thanks
    i have question about excel and excel VBA
    what types of programms can i do with excel vba
    and can i work freelance with this excel
    because i love excel ..i know a lot of things like powerquery , powerpivot , language called "M" and other things in excel
    can you suggest a way to work as freelancer
    and thanks man again
    and sorry if english is not good , because i speak arabic langauge

  • @tarekyeh6245
    @tarekyeh6245 7 ปีที่แล้ว

    Great video!....you seemed a little bit sick i hope you are doing fine now :D

  • @zubairkahn1983
    @zubairkahn1983 6 ปีที่แล้ว

    Hi Andrew,
    First many thanks for all the videos you made. They are all wonderful. Can I ask you some help in a code that I am stuck for now over three days? If yes, I can paste the code here. It's a very simple and short code. I am new to VBA and only started coding after your videos. Thank you.
    Cheers
    Zubair

  • @skyhawk_pilot
    @skyhawk_pilot 7 ปีที่แล้ว

    Can you use command buttons in case statements? Example: Time Logger ( click button at start of event)

  • @kerstinkerstin6877
    @kerstinkerstin6877 6 ปีที่แล้ว

    These videos are really good. İ have one question: could somebody explain to me the difference between variable,string and integer? İ am in video part 13,and İ did not yet understand the difference. Thanks in advance!

    • @karnabudhathoki5311
      @karnabudhathoki5311 6 ปีที่แล้ว

      In simple terms a variable is something whose value varies....so for example if "x" may take any of the values 1,2,3,4,5 then x is a variable bkoz at one time x= 1 at another time x=2 and another x=3 and so on and so forth .....But in the scenario of writing vba codes or any other..variable is something which can hold values as in the above example of x. Integer and strings are data types....strings are text data type.Integer is a numeric data type( with limitation ).

  • @saajanrajak3054
    @saajanrajak3054 7 ปีที่แล้ว

    Can't we use, Application Inputbox for selecting Film Name and then its address offset for Film Length? I tried But It's not working. Can you help?

  • @shashikalagangappa4735
    @shashikalagangappa4735 7 ปีที่แล้ว

    hi sir
    please help me in vba
    if specific cpt code need to use specific units but if it is used morthan one units how get difference between code and units.

  • @gokkulvd9568
    @gokkulvd9568 7 ปีที่แล้ว

    I have interview on VB and SQL....If I get selected I will definitely donate 2% of my salary to you....

  • @rozanighani
    @rozanighani 7 ปีที่แล้ว

    What is difference between Else and ElseIf ?
    Thank you.

  • @mout001
    @mout001 6 ปีที่แล้ว

    I've add a snapshot from a file. So end of Mei I want to Copy the data from range "U5:U106", End of June I want to copy range "V5:V102" etc, etc, and copy this into antoher workbook. The problem is how can I pre-define the range based on a cell in the file? E.g.: Reporting Month: "mei-18" in cell "AA5" then the macro will select range "U5:U102" and copy. Or with a Msgbox. etc. Who can help?

  • @gelucu1546
    @gelucu1546 4 ปีที่แล้ว

    Outstanding

  • @jayjayf9699
    @jayjayf9699 5 ปีที่แล้ว

    If I learn excel vba , would that be the same as access vba or is that different?

    • @WiseOwlTutorials
      @WiseOwlTutorials  5 ปีที่แล้ว

      VBA is the same language in all the MS Office applications. Naturally, in Access you won't be referring to Workbooks, Worksheets, Ranges etc. as in Excel, but the structure and syntax of the language is the same.

  • @SantoshLoka
    @SantoshLoka 7 ปีที่แล้ว

    how to use "if not" condition?

  • @Tat-cx1lr
    @Tat-cx1lr 8 ปีที่แล้ว

    Bravo!!!

  • @FRANKWHITE1996
    @FRANKWHITE1996 9 ปีที่แล้ว

    thank you

  • @keshavroyyala
    @keshavroyyala 10 ปีที่แล้ว +4

    Did you have cold during this video???

  • @naresh1010ful
    @naresh1010ful 4 ปีที่แล้ว

    Sub WorkingwithIf()
    Dim movnam As String
    Dim movsearch As Range
    Dim movlenght As Integer


    movnam = Application.InputBox("Type Movie Name")


    Set movsearch = Range("b2", Range("b2").End(xlDown)).Find(movnam)

    movsearch.Select

    movlenght = ActiveCell.Offset(0, 2).Value

    If movlenght > 100 Then

    MsgBox movnam & " is a Big Movie"

    Else
    MsgBox movnam & " is a short Movie"

    End If


    End Sub

  • @Ychhenghak
    @Ychhenghak 10 ปีที่แล้ว

    Not bad

  • @irynamusiiovska828
    @irynamusiiovska828 6 ปีที่แล้ว

    thank you