Excel for Investment Banking: VBA and How to Use It

Поділитися
Вставка
  • Опубліковано 4 гру 2024

КОМЕНТАРІ •

  • @moe78614
    @moe78614 5 років тому +34

    You guys are so underrated

  • @ChiefBeef3
    @ChiefBeef3 5 років тому +11

    Every time I search for a VBA tutorial I kept finding the wrong solutions. It's nice to finally have an applicable use of VBA from M&I. Thanks yet again

    • @financialmodeling
      @financialmodeling  5 років тому

      Thanks, glad to hear it! More coming soon...

    • @vladkovalenko9222
      @vladkovalenko9222 4 роки тому

      @@financialmodeling Hey guys! Thanks for the video. Can you please recommend some other useful for IB, PE VBA tutorials

    • @financialmodeling
      @financialmodeling  4 роки тому

      @@vladkovalenko9222 We have an entire set of VBA lessons in our Excel course. Beyond that, you can find VBA books, but there isn't much specifically tailored to IB/PE because you tend to use VBA in fairly simple ways in those fields, and you don't even use features such as User Forms that take up entire chapters of other books.

  • @sreeram5119
    @sreeram5119 3 роки тому +2

    Thanks for u cleared my hesitation about languages. Thanks a lot.

  • @nishankbani3257
    @nishankbani3257 3 роки тому +1

    Excellent, concise and clear.

  • @msftwong
    @msftwong 4 роки тому +2

    4:50 you can just use the format button to fill the input box

    • @financialmodeling
      @financialmodeling  4 роки тому

      See the other comments/threads here for why none of the other options (styles, copy/paste formats, formatting brush, etc.) do exactly what we want.

  • @Rainman___
    @Rainman___ 4 роки тому +2

    This is amazing. Thank you so much

  • @Sai-tek
    @Sai-tek 4 роки тому

    That's a great suggestion. Recording macros and decoding the coding part later. It helps in understanding faster. Why don't you guys launch affordable pricing options for the Indian market?

    • @financialmodeling
      @financialmodeling  4 роки тому +1

      Because we don't serve the Indian market. The finance industry is much smaller than in places like the US, UK, and HK, and prices are also reduced... so we'd be spending the same amount of time and money to go after a market with far less in potential revenue.

    • @Sai-tek
      @Sai-tek 4 роки тому

      @@financialmodeling "Less in potential revenue". That's funny.

  • @tarunx2
    @tarunx2 2 місяці тому +1

    This video motivated me to quit VBA!

  • @taimoorali4822
    @taimoorali4822 5 років тому +2

    This is Amazing, can you please give us the code you built in this video ? I could re use it for my modeling tasks

    • @financialmodeling
      @financialmodeling  5 років тому +3

      Click "Show More" and click on the links under Resources. The VBA code is in the .xlsm file there.

  • @costanzadotjpg
    @costanzadotjpg 5 років тому +2

    For your input cell example, wouldn't you just setup & use Styles? If your manager later wants all input boxes to be a different colour, you can just modify the particular style and the whole model will be updated. Your Ctrl+Shift+I macro won't be able to. Great video nonetheless!

    • @financialmodeling
      @financialmodeling  5 років тому +1

      That is a good point. Styles are another way to do it, but the disadvantage there is that you have to select all the cells manually and then apply the style first. Updates or changes are easier to handle with Styles, but cell styles themselves tend not to change much in financial models (as different firms/groups have their own preferences). And you could always just press Ctrl + A and run the macro again to change or update the styles.

  • @teob3690
    @teob3690 3 роки тому +1

    really useful

  • @callumc1208
    @callumc1208 5 років тому +1

    Really helpful vid! Recent grad looking to learn VBA or Python, which would you recommend? Also, what is the best way to learn VBA syntax? Thanks!

    • @financialmodeling
      @financialmodeling  5 років тому +5

      VBA is more useful for roles such as investment banking, private equity, fundamental-based hedge funds, corporate development, and corporate finance. Python is more useful for roles like trading, quant funds, data science, or anything else where you work with huge sets of data (i.e., millions of rows rather than thousands of rows as in Excel). Best way to learn VBA syntax is to record yourself performing actions as macros, then look at the code and modify it. Our new Excel course will also include around 7-8 hours of VBA tutorials as an introduction.

    • @callumc1208
      @callumc1208 5 років тому

      @@financialmodeling Thank you!

  • @Fiona-io4fe
    @Fiona-io4fe Рік тому

    Thanks for the video, do you know why I recorded macro successfully and its working but there is no code in VBA? (module 1)

    • @financialmodeling
      @financialmodeling  Рік тому

      I can't say without seeing your exact Excel setup and settings. You might have somehow disabled macros or parts of the VBA object model within the "Trust Center" in the Excel settings, or you might have multiple files open, and it might not be saving in the correct spot. But these are just guesses.

  •  4 роки тому

    I'm curious, did you really need your write code? Wouldn't it be faster to just record a macro without division deep into coding with visual basic?

    • @financialmodeling
      @financialmodeling  4 роки тому

      Sure, it's always faster to record the macro and leave it alone. But sometimes you want to add extra features, error checks, different conditions, etc. that you cannot do within the recorder. Also, the code produced by the macro recorder tends to be ugly and difficult to maintain.

  • @kamranb1369
    @kamranb1369 5 років тому +1

    Hello,
    What about SQL knowledge?
    thanks

    • @financialmodeling
      @financialmodeling  5 років тому +2

      Sure, SQL knowledge helps, but I'd say it's even less likely to come in IB/PE roles than VBA or Python. It's probably more useful if you're in corporate finance at a normal company and you need to retrieve a lot of data from internal sources for use in reports. So: maybe learn the basics of SELECT statements, JOINs, conditionals, etc., but don't go crazy with it. A lot of programmers actually know shockingly little about SQL but somehow do their jobs anyway.

  • @Abhimanyutrakroo
    @Abhimanyutrakroo 2 роки тому

    Hi, can you pls help me with what softwares to use for making a video

  • @derick3253
    @derick3253 5 років тому +1

    Format painter my friend

    • @financialmodeling
      @financialmodeling  5 років тому +4

      Doesn't work as well because it can't detect the difference between true input cells with numeric constants vs. empty cells and text. Also, it incorrectly changes number formats. So it's really no different than Paste Formats.

  • @Imdazedandconfuzed
    @Imdazedandconfuzed 4 роки тому

    100K anyday now!

  • @christopherdamelio3283
    @christopherdamelio3283 Рік тому +1

    What are some books did you read to learn this?

    • @financialmodeling
      @financialmodeling  Рік тому

      Check out Joseph D. Moore's books on Excel & VBA (may be more recent editions available now, but probably no huge changes).

  • @leon436100
    @leon436100 5 років тому

    Just curious
    Why not use format painter instead of going for such trouble

    • @leon436100
      @leon436100 5 років тому

      Or do cell color formatting before inputting numbers..

    • @financialmodeling
      @financialmodeling  5 років тому

      Format Painter is less powerful because 1) It also copies number formats, which we don't want - we only want to copy fills and borders but NOT font colors or number formats; and 2) With Format Painter, you have to select the exact cells you want to copy all the formats to. With our final macro, we can just select a big area of cells, or even an entire spreadsheet, and it automatically finds which ones are input cells and which ones aren't... without us having to select each input cell or range of cells separately.

    • @leon436100
      @leon436100 5 років тому

      Mergers & Inquisitions / Breaking Into Wall Street
      I see. That makes a lot of sense.

  • @josestudyexcel
    @josestudyexcel Рік тому

    No sample file?

  • @TheMarinho1
    @TheMarinho1 4 роки тому

    Can you state which Excel version you are using? My bank uses Excel 2010 and it seems that the syntax is slightly different in my excel which leads to the code not working.

    • @financialmodeling
      @financialmodeling  4 роки тому

      This was done in Excel 2019, but Office 365 is effectively the same. Yes, some of the older versions have syntax differences; we generally say that Excel 2013 is the minimum for our current tutorials, as there are too many differences prior to that (once you go beyond basic shortcuts).

  • @michaelnassif7393
    @michaelnassif7393 4 роки тому

    Sorry but can you explain briefly why in the code you are using “if not” statement instead of just “if”. I’m a rookie, but I’m assuming within the “union” section of your code, you’re using a double negative basically saying that if the formula cells selected are not nothing (aka there is something in the cell) then apply this rule. Can you confirm this is what you’re doing?

    • @financialmodeling
      @financialmodeling  4 роки тому

      Because "If Not" (double negative) is the easiest way to verify that the user has actually selected cells rather than a blank range. This is just the way VBA is set up and one of the quirks of the language.

    • @michaelnassif7393
      @michaelnassif7393 4 роки тому

      @@financialmodeling thank you. So my understanding is correct?

    • @financialmodeling
      @financialmodeling  4 роки тому

      @@michaelnassif7393 Yes