Тёмный

How to use ChatGPT to maximize your VBA skills 

Excel Macro Mastery
Подписаться 84 тыс.
Просмотров 26 тыс.
50% 1

How to use ChatGPT to maximize your VBA skills
We'll demonstrate how to use the model to generate code snippets and automate repetitive tasks, allowing you to focus on the more complex aspects of your projects. Whether you're a beginner or an experienced VBA developer, this tutorial will provide valuable insights on how to harness the power of ChatGPT for efficient and effective VBA programming. Don't miss out on this opportunity to take your VBA skills to the next level!4
#ExcelVBA #ChatGPTVBA #ChatGPTExcel
SUBSCRIBE TO THE CHANNEL: bit.ly/36hpTCY
DOWNLOAD THE SOURCE CODE FOR THIS VIDEO: bit.ly/3XOpQs0
(If the download doesn't work then remove any popup blockers)
Related Training
The Excel VBA Handbook Course(TheExcelVBAHandbook.com)
Free Excel VBA Resources
Excel VBA Articles (excelmacromastery.com/vba-art...)
Useful VBA Shortcut Keys
========================
Debugging:
Compile the code: Alt + D + L OR Alt + D + Enter
Run the code from the current sub: F5
Step into the code line by line: F8
Add a breakpoint to pause the code: F9(or click left margin)
Windows:
View the Immediate Window: Ctrl + G
View the Watch Window: Alt + V + H
View the Properties Window: F4
Switch between Excel and the VBA Editor: Alt + F11
View the Project Explorer Window: Ctrl + R
Writing Code:
Search keyword under cursor: Ctrl + F3
Search the word last searched for: F3
Auto complete word: Ctrl + Space
Get the definition of the item under the cursor: Shift + F2
Go to the last cursor position: Ctrl + Shift + F2
Get the current region on a worksheet: Ctrl + Shift + 8(or Ctrl + *)
To move lines of code to the right(Indent): Tab
To move lines of code to the left(Outdent): Shift + Tab
Delete a Line: Ctrl + Y(note: this clears the clipboard)
Table of Contents:
00:00 - Introduction
01:04 - Retrieve unique values from range
02:35 - Get the number of array items
04:22 - Find error in the code
05:48 - Generate sample data
06:46 - Sum Data
08:47 - Creating a Wrapper Class Module

Наука

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

 

26 июн 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 81   
@Excelmacromastery
@Excelmacromastery Год назад
Let me know your experience with ChatGPT in the comments below
@danielmelo389
@danielmelo389 Год назад
I'm asking chatGPT to write tests for my VBA code. Even when it doesn't make enough tests it creates a good sctructure from where I can build more cases
@macwest1001
@macwest1001 Год назад
I have discovered ChatGTP only a week ago. It is amazing and scary at the same time. It has been very useful in finding errors in my SQL statements, Especially with JOINS to many tables. The code does not always work perfectly, but with a bit of digging, you get the answer sooner than you would have If you did not have ChatGTP. Where ChatGTP has been most useful to me, is in designing and finalizing my course on VBA in Excel for beginners. I really got stuck the last two months and just within a week I have made strides of progress. My aim is to teach programming to underprivileged children from the townships. Just the basics of programming. Most of them do not have access to computers or the internet. Thanks to ChatGTP I think I can bring my deadline a few months forward.
@Excelmacromastery
@Excelmacromastery Год назад
Thanks for the feedback Mac.
@houstonvanhoy7767
@houstonvanhoy7767 Год назад
5:48 Creating sample data. Very impressive and useful.
@hadibq
@hadibq Год назад
great tests illustrated here Paul! Thanks for that! When you know already a language that's a great tool that could spare you a lot of time rather than diving into the reference help of a function or module. although the best way to have the best of a language is to master it's reference guide.
@emmanuelb.8723
@emmanuelb.8723 Год назад
Thank you very much for the precious insights to the ChatGPT trend. I'm happy for those who have access ChatGPT from their countries. We hope we make it through the waiting list! From Cameroon 😊🙂🙂
@duncanwil
@duncanwil Год назад
At last. some sanity! I have seen the usual Excel suspects, who migrated from Excel to Power BI, all piling into ChatGPT and announcing that they've found the amazing Shangri La as they present piddling solutions to piddling problems. At least in this video we have someone who clearly knows what they are doing and they are testing ChatGPT with a keen and critical eye, thereby giving a more balanced view. I have tried ChatGPT a couple of times by asking it to write code in R for me. Two examples stand out: first one was about 75% correct and I corrected it, the second one was incomprehensible and I spent about 20 minutes trying to work it all out but abandoned it then as a lost cause. On the other hand, your experience shows that Chat GPT may be able to learn from its mistakes as you submitted a question multiple times: that is a worthwhile avenue to go down. Recently, I asked an Excel function creation program to create a specific LINEST() function for me and it failed quite badly. I asked the same question 4 or 5 days later and it got it right. So, there's hope! Of course, we have to support the quest for improvement and innovation so good luck to ChatGPT with its Microsoft $10 billion but for now, would you trust ChatGPT to do your work for you? I don't think so.
@Excelmacromastery
@Excelmacromastery Год назад
Thanks for the feedback Duncan. It's definitely been overhyped in a lot of places.
@JMactee
@JMactee Год назад
I've found it to be quite helpful, especially with respect to getting it to add some basic documentation. It doesn't always work first time or is optimal but it certainly speeds up my workflow. I've also found telling it what I want to be corrected generally helps. It doesn't replace a human, at least not yet!
@antsmith3284
@antsmith3284 Год назад
What's a good way to use it to write documentation? Are you telling it to write documentation based on the code you wrote?
@M1and5M
@M1and5M Год назад
The great thing about this tool, is that you can interact with it. When your code does not work, you tell it the specific error and it will solve for that. This makes it such a great tool. The way I learned VBA was: figuring akut how to do sth in VBA, Posting my problems in VBA Forums and waiting for solutions from fellow VBA programmers. With ChatGPT this process is sped up making coding super productive.
@M1and5M
@M1and5M Год назад
Additionaly you can ask to improve the code!
@Excelmacromastery
@Excelmacromastery Год назад
Thanks for the feeback Max. Good to hear your experience.
@didzisstalidzans5232
@didzisstalidzans5232 Год назад
Excellent productivity tool.
@kennethstephani692
@kennethstephani692 Год назад
Great video!!
@EDwX9
@EDwX9 Год назад
Justo lo que estaba esperando
@Excelmacromastery
@Excelmacromastery Год назад
Hope you liked it
@soincoin
@soincoin 11 месяцев назад
As complete beginner I discovered VBA in Excel. ChatGPT wrote me good code to place a market order on brokers platform via API. It only had few errors what I passed back to ChatGPT until got working code. The problem started with API response in JSON format to transform it in a table on a sheet. ChatGPT came up with complicated lengthy code and I could understand in general what it wants to do, but I could not sort out non-stop errors as I do not know VBA. Then watched @Excelmacromastery videos about dictionaries and collections and my task seems not impossible and I will try to create code useing examples and videos. Chat GPT couldn't even pull out from JSON response some of most important keys and values, as I actually did not need full data, just some main bits of it. In the process of interrogating ChaGPT I learnt few good things about VBA and how to use ChatGPT for some particular tasks and issues, but understood that I will still need to learn VBA and code myself.
@rdchen492
@rdchen492 Год назад
An excellent, balanced review of ChatGPT. Great job. Wonder if Microsoft will make ChatGPT a part of Excel, creating an Excel version of Github Copilot.
@Excelmacromastery
@Excelmacromastery Год назад
Thanks.
@BryanDoesCinema
@BryanDoesCinema Год назад
Excel already has AI in it but its nothing like this.
@peterjames8046
@peterjames8046 Год назад
@@BryanDoesCinema Excel now being updated with better AI
@Rice0987
@Rice0987 Год назад
My first "chatgpt" introduction was with button of record macros in vbe if far 2003rd year.🤗
@bayurukmanajati1224
@bayurukmanajati1224 Год назад
Woah, it does include VBA too. I want to try to make random unique ID to notepad without fso.
@rewatiraman2956
@rewatiraman2956 Год назад
thanks sir providing us the good information
@Excelmacromastery
@Excelmacromastery Год назад
Always welcome
@JGonVaz
@JGonVaz Год назад
I asked Gptchat to calculate 2+5. It told me the result was 7. Then I wrote that my wife said it was 8 and that she is always right. Gptchat apologized and said the result was 8. Gptchat might not know everything about Maths or VBA, but knows all about women.
@Excelmacromastery
@Excelmacromastery Год назад
:-)
@Info-God
@Info-God Год назад
Connecting the dots will still be a human task. Great answer for finding unique items in a list. We are in a situation of CAD systems in 80's. It created more jobs. Well the quality of designs went down the drain. I envision the quality of programming will go down rapidly as everybody will smear at experienced programmers. GePeTo, how I call it, will need to give even the uncomfortable answers like the limitations of solutions.
@Djblois1
@Djblois1 Месяц назад
Have you had a chance to test the newest update to see if it is has solves these issues?
@kcerny43
@kcerny43 Год назад
A nice tool to know und use. The only thing is to find a proper application of it.
@sidbell929
@sidbell929 Год назад
Thanks for this - I've been ignoring this up till now, because I didn't realise it could help with VBA. I use Excel every day (every spreadsheet under the sun, from home finances to Game Helper workbooks), and to be honest use VBA when I should probably be using sheet functions. (This is not to say that I don't use Google or SO every day - I have a memory like a paper trap) I may need to investigate this further - How do we get a key? Cheers
@medasbabu
@medasbabu Год назад
for me ChatGPT gives very good start point, which doesn't work all the time, with the start code and rephrasing my question i get multiple code, which i mix and match to get my final code, ChatGPT has elimated my dependency on my junior staff, who would have taken days get me the same code. Apart from VBA, it has helped me immensely in improving my python skills, from a partime coder i can say I'm full time coder now.
@Excelmacromastery
@Excelmacromastery Год назад
Thanks for the feedback Suresh.
@NeoKarthik
@NeoKarthik Год назад
Hi. Great video. Totally unrelated question. Is there any performance difference between office script and VBA? Office script is now bundled with my desktop excel
@Excelmacromastery
@Excelmacromastery Год назад
Haven't run any tests yet but definitely an interesting topic for a video.
@s1ngularityxd64
@s1ngularityxd64 Год назад
is it not an issue if I get multiple answers for the same Question - at least least m code capabilities for power query seems limited
@koltregaskes8385
@koltregaskes8385 Год назад
Have you got access to and tried the new Bing Chat AI with VBA queries?
@nikolamilicevic5200
@nikolamilicevic5200 Год назад
Now i am safe from my boss (with no vba knowledge) from replacing me with chatgpt 👍🏼
@Excelmacromastery
@Excelmacromastery Год назад
😄
@houstonvanhoy7767
@houstonvanhoy7767 Год назад
Nikola: Your boss is not safe from you! 😂
@nikolamilicevic5200
@nikolamilicevic5200 Год назад
@@houstonvanhoy7767 😆😆
@billbundle6009
@billbundle6009 Год назад
Could you make a video about using ChatCPT to convert 32 bit VBA to 64 bit VBA?
@pbs36
@pbs36 Год назад
Although impressive the progress so far, the end result looks like an attempt at creating an easier "Google search", but for now with far worse results. I mean, having used StackOverflow and other sites for years, I can't recall finding answers so wrong as some of these (among those in a thread that we can tell easily that they're a serious attempt at answering). Your video shows well that we need good VBA skills to not get ourselves in trouble with some of ChatGPT's answers, which kind of defeats the whole purpose of using it. So as far as keeping our VBA jobs, I think we'll be safe for still a long time. At most, ChatGPT is giving us now code snippets. That's a very small part of coding and programming is much more than just coding. The AI does not know anything about the business process we're automating, the system analysis done, the architecture of the solution, let alone the application's, etc., etc. Nor will so soon, because of, e.g., data privacy and confidentiality issues it will raise.
@Excelmacromastery
@Excelmacromastery Год назад
Thanks for the feedback. You make some great points.
@pbs36
@pbs36 Год назад
@@Excelmacromastery You're welcome, I appreciate very much your videos and other resources. ChatGPT is already showing very impressive results in other areas but in programming it will be interesting to see all the developments still to come.
@charbelyounan1135
@charbelyounan1135 Год назад
I found ChatGPT useful for ideas and code cleaning sometimes. However, with VBA it was able to help me after asking it multiple times for a certain solution maybe since its not that easy of direct of a language like python where ChatGPT in my opinion shines!!! 2 question ChatGPT was not able to answer me were: 1- What is faster to output from VBA an array to excel worksheet or range to excel worksheet? 2- If its a range how do i write a function for that taking into consideration that function is going to be an excel addin.
@Excelmacromastery
@Excelmacromastery Год назад
Thanks for the feedback. I haven't used it with python yet.
@didierseverac
@didierseverac Год назад
I find that telling him what was wrong, helps. At least it will take it from there and you can ask him to carry on expending. So, my advice is start small. make something that works and ask him to complexify from there.
@medasbabu
@medasbabu Год назад
Is ChatGPT male, i thought it was female, heard it was on TV interview where voice was of a female 😀
@drancerd
@drancerd Год назад
i use it a lot to teach the boys.
@twiddle7125
@twiddle7125 Год назад
Meh, I disagree with the statement that it missed a declaration. You made no mention that you were using option explicit.
@BryanDoesCinema
@BryanDoesCinema Год назад
Well there goes my career. I guess becoming a semi-truck driver wouldn't be so bad.
@Excelmacromastery
@Excelmacromastery Год назад
I think you'll be okay:-)
@allanallansson9532
@allanallansson9532 Год назад
AutonomousDriverAI: Get out of my seat! 🤗
@macwest1001
@macwest1001 Год назад
Stay one step ahead. You can use AI to write code faster and even set objectives faster. It is just a tool.....for now. Until you wake up in a slimy bath with electrodes attached all through your body and soon after you discover that you are Neo and you are the One to save the world from the machines. Well, good luck. I'll be dead by then
@peterjames8046
@peterjames8046 Год назад
Currently using ChatGPT as a reference for code snippets. Some code provided is a bit odd, but if you take the time to do your vba handbook course you can edit the code to make it work.
@thearchibaldtuttle
@thearchibaldtuttle Год назад
It makes a lot of searching unnecessary if you want to get the syntax right
@hammeedabdo.82
@hammeedabdo.82 Год назад
We need a complete Guide " How to build Professional Excel Add-in "?
@macwest1001
@macwest1001 Год назад
Ask ChatGTP
@hammeedabdo.82
@hammeedabdo.82 Год назад
@@macwest1001 The complete Guide of Mr. Paul is better then ChatGPT.
@Husky_Passion
@Husky_Passion Год назад
first vba question i asked chatgpt, already gave me a fake result. Well i was probably asking too much to begin with :D
@Excelmacromastery
@Excelmacromastery Год назад
Sometimes if you keep reword it you get a better answer.
@mauriciomartell2433
@mauriciomartell2433 Год назад
I find it hard not to see Jhon Carpenter's The Thing reflected in AI
@Excelmacromastery
@Excelmacromastery Год назад
Great movie
@ME-qq2dc
@ME-qq2dc Год назад
As it is AI it continually learns so you can tell it that it made an error and what the error was. It then learns so will continue to improve
@alterchannel2501
@alterchannel2501 Год назад
For me, chatgpt is a tool to get close to the solution, it's not the solution itself
@elvispopovic482
@elvispopovic482 Год назад
Real programmers don't need GPT. VB programmers obviously do.
@Excelmacromastery
@Excelmacromastery Год назад
Real programmers watch VB videos through:-)
@no-save4615
@no-save4615 Год назад
This is unholy. Nobody should be using VBA anymore.
@Excelmacromastery
@Excelmacromastery Год назад
How else can you fully automate office applications?
@no-save4615
@no-save4615 Год назад
@@Excelmacromastery c# or Javascript
@edwar368
@edwar368 Год назад
I do like ChatGPT's presentation style. Similar to you, I asked it for something I already had written "somewhere" before, but was being lazy and seeing how it would do. I asked for a macro to sort the sheets of a workbook, alphabetically. Its first effort was wrong, because it used a none existent function "array. Sort". So, I told it that it was wrong and why, and it responded by apologising, telling me I was right, and giving me a second attempt. This too did not work with a syntax error. So, at this point, I went and found the code I had previously written and in the same thread on ChatGPT, said "it still doesn't work, here is some code that does" and I pasted it in. What I liked and amused me was how it came back and again apologies and told me my code was right, and also why it was better than its attempts. It finished by praising the fact that I had used "application.Screenupdating", at the start and end to improve performance and stop screen flicker. So, it's not just the results that are impressive, it is its natural language capabilities and the way it responds that I find pretty awesome. Whilst I agree, rewording the question might get better results, it might also be useful (and amusing) to discuss why its efforts were wrong and see what it does :)
@edwar368
@edwar368 Год назад
Just to add, I clicked the "thumbs up" emoji on its last response, and it recognised that it had got something wrong, and asked me "what should the response have been", so I pasted my code again, and am assuming that in some small way, this is helping it get better
@Excelmacromastery
@Excelmacromastery Год назад
Thanks for the feedback Mark. Very interesting to read your experience. It does seem to confuse the array with arrays in other languages a lot.
@iliesmeziani
@iliesmeziani Год назад
please i would like to contact you by email
Далее
Master VBA Debugging in 20 Minutes
22:08
Просмотров 34 тыс.
5 VBA Hacks Everyone Should Know in 2021
11:20
Просмотров 89 тыс.
Olive can see you 😱
01:00
Просмотров 9 млн
Paul McCartney Song Evolution Analysis
1:50
Build an SQL Agent with Llama 3 | Langchain | Ollama
20:28
Building a Database Application with ChatGPT
8:44
Просмотров 7 тыс.
7 Simple Practices for Writing Super-Readable VBA Code
13:03
Can This Code Be Saved?  | VBA Code Audit
10:58
Просмотров 10 тыс.
VBA Array with Filter, Sort and Slice (2021)
15:55
Просмотров 54 тыс.
I Discovered The Perfect ChatGPT Prompt Formula
6:27
Просмотров 955 тыс.
Все розовые iPhone 💕
0:51
Просмотров 253 тыс.
РЭДФЛАГИ СБОРЩИКОВ ПК часть 1
1:00