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
@financialmodeling5 жыл бұрын
Thanks, glad to hear it! More coming soon...
@vladkovalenko92224 жыл бұрын
@@financialmodeling Hey guys! Thanks for the video. Can you please recommend some other useful for IB, PE VBA tutorials
@financialmodeling4 жыл бұрын
@@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.
@sreeram51193 жыл бұрын
Thanks for u cleared my hesitation about languages. Thanks a lot.
@financialmodeling3 жыл бұрын
Thanks for watching!
@nishankbani32573 жыл бұрын
Excellent, concise and clear.
@financialmodeling3 жыл бұрын
Thanks for watching!
@msftwong4 жыл бұрын
4:50 you can just use the format button to fill the input box
@financialmodeling4 жыл бұрын
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___4 жыл бұрын
This is amazing. Thank you so much
@financialmodeling4 жыл бұрын
Thanks for watching!
@taimoorali48225 жыл бұрын
This is Amazing, can you please give us the code you built in this video ? I could re use it for my modeling tasks
@financialmodeling5 жыл бұрын
Click "Show More" and click on the links under Resources. The VBA code is in the .xlsm file there.
@costanzadotjpg5 жыл бұрын
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!
@financialmodeling5 жыл бұрын
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.
@Sai-tek4 жыл бұрын
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?
@financialmodeling4 жыл бұрын
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-tek4 жыл бұрын
@@financialmodeling "Less in potential revenue". That's funny.
@tarunx22 ай бұрын
This video motivated me to quit VBA!
@financialmodeling2 ай бұрын
Glad to help!
@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 Жыл бұрын
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.
@kamranb13695 жыл бұрын
Hello, What about SQL knowledge? thanks
@financialmodeling5 жыл бұрын
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.
@teob36903 жыл бұрын
really useful
@financialmodeling3 жыл бұрын
Thanks for watching!
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?
@financialmodeling4 жыл бұрын
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.
@josestudyexcel Жыл бұрын
No sample file?
@financialmodeling Жыл бұрын
Click "More" or "Show More" and scroll to the resources.
@Abhimanyutrakroo2 жыл бұрын
Hi, can you pls help me with what softwares to use for making a video
@financialmodeling2 жыл бұрын
Camtasia
@callumc12085 жыл бұрын
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!
@financialmodeling5 жыл бұрын
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.
@callumc12085 жыл бұрын
@@financialmodeling Thank you!
@christopherdamelio3283 Жыл бұрын
What are some books did you read to learn this?
@financialmodeling Жыл бұрын
Check out Joseph D. Moore's books on Excel & VBA (may be more recent editions available now, but probably no huge changes).
@leon4361005 жыл бұрын
Just curious Why not use format painter instead of going for such trouble
@leon4361005 жыл бұрын
Or do cell color formatting before inputting numbers..
@financialmodeling5 жыл бұрын
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.
@leon4361005 жыл бұрын
Mergers & Inquisitions / Breaking Into Wall Street I see. That makes a lot of sense.
@TheMarinho14 жыл бұрын
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.
@financialmodeling4 жыл бұрын
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).
@michaelnassif73934 жыл бұрын
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?
@financialmodeling4 жыл бұрын
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.
@michaelnassif73934 жыл бұрын
@@financialmodeling thank you. So my understanding is correct?
@financialmodeling4 жыл бұрын
@@michaelnassif7393 Yes
@derick32535 жыл бұрын
Format painter my friend
@financialmodeling5 жыл бұрын
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.