Hi everyone. Please enjoy the first video about VBA Dictionary. If you have any comments, please add them below.
@turkaykoc8587 Жыл бұрын
Your did a very good job, thank you so much for the clear explanations.
@trinhthanhlinh1505 жыл бұрын
Your explanation is trule comprehensive. Thank you Paul!
@Excelmacromastery5 жыл бұрын
Thanks Trinh
@VBAbyMBA3 жыл бұрын
So simple but have so many possibilities. Thanks ☺️
@franciscoaugustovarelaagui2443 Жыл бұрын
muchas gracias por la clase! Muy claro todo!!
@Up4Excel5 жыл бұрын
Very well explained...and I can see there will be plenty of uses so looking forward to the rest of the series
@gilenomascarenhas66934 жыл бұрын
Oh, man... this is pure gold. Thank you, sir.
@prakashsrinivasan78403 жыл бұрын
Well explained thank you👍👍👍
@sakhilengwenya5944 ай бұрын
Please do an example on mapping data using dictionary and arrays
@virginiacardinalchildsuppo50903 жыл бұрын
Awesome lecture
@rakeshkumarmadella79554 жыл бұрын
Thank u so much Paul.. I am getting your emails every day.. your channel is very useful .. very nice wonderful great video.. I really loved it sir
@ryanquinn12572 жыл бұрын
Best excel advice and vids. Perfectly solves a problem trying to count duplicates of a list where I don’t want to sort the list, it has to process in order. I have a SKU name I pull from JSON data and a file i end up downloading where the download is named SKU name for first then SKU name-1 for the second SKU name -2 so on. This allows me to add the SKU as the key, value is duplicateCount starting at 0. If the SKU name hasn’t shown up yet add it to dictionary, Otherwise increment up duplicateCount If duplicateCount is 0 then keep SKU name as SKU, otherwise SKU-duplicateCount
@MyAudioBookCompilation2 жыл бұрын
Wow you have a different approach of using and explaining Dictionary. I have been using this for quite sometime but explaining Item like a Value makes it more understandable. I want to learn how to use API and i though your guidance will bring me there. Thank you so much.
@buithitrami1755 жыл бұрын
Thanks Paul! It has been 2 weeks since your last video. Looking forward to more videos soon 😊
@Excelmacromastery5 жыл бұрын
Hi Mi. I will be uploading more frequently in the future.
@buithitrami1755 жыл бұрын
Can’t wait 👍🏾
@wattjock24053 жыл бұрын
I am very grateful to your videos and am learning a lot. I opened the Watch Window and added dict("Apple") to it as shown in video. The Code, the Watch Window, and the Immediate Window all work fine as I Step through (F8) the Code. However; when I then add dict("Orange") to the Watch Window and step through with F8, I get the Error Message that "This Key is already associated with an element of this Collection". But... if I use F5 to simply run the code, everything runs and the Immediate Window prints out all the correct Values. What am I missing?
@Excelmacromastery3 жыл бұрын
This is actually a bug with the Dictionary. If you add an item in the watch window it gets added to the Dictionary. It caught me out a few times before I discovered it.
@wattjock24053 жыл бұрын
@@Excelmacromastery ~ thanks... thought I had written the Code incorrectly. Yes, I write all of the Code as you present it "for the practice".
@vikuedutech50613 жыл бұрын
Really wonderful and i have made a real dictionary in excel userform ..
@thearchibaldtuttle5 жыл бұрын
Nice, never used the watch window this way!
@Excelmacromastery5 жыл бұрын
Thanks. It's a nice way of demonstrating the values in the variables.
@raulleopoldobini68312 жыл бұрын
Hi! can you teach us how yo create a dictionary of collections of class collections?
@dmp72523 жыл бұрын
Is there a spot where we can see what the end-product looks like?
@wayneedmondson10655 жыл бұрын
Hi Paul.. great intro to using a Dictionary.. looking forward to more. I see below you've mentioned about early and late binding. So, if you are going to distribute your code to users who might not have a reference to the Scripting Runtime, then you early bind while you write the code (for Intellisense) and then modify the code to late bind (Dim dict and Set dict=CreateObject("Scripting.Dictionary")) before distribution? That seems like the logical approach..yes? Thanks for the inspiration to think and create. Thumbs up!
@Excelmacromastery5 жыл бұрын
That's exactly right Wayne. For distribution it is always better to use late binding.
@wayneedmondson10655 жыл бұрын
@@Excelmacromastery Thanks Paul.. loving your videos and KZbin channel. BTW, on your channel, take a look at the View Full Playlist for Excel VBA Collections. It looks like someone inserted a 6th video into the list.. not related to VBA.. maybe some kind of a hack.. don't want to click on it.. but it definitely looks like it does not belong there. Thought you would want to know and delete it or report it to KZbin. Thanks again!
@Excelmacromastery5 жыл бұрын
Thanks Wayne. I removed that video. All is good now.
@sebastienantunes96683 ай бұрын
Very useful video ! I was surprised by following the intellisense dict.Add(“Apple”,60) does not work but if I write dict.Add “Apple”,60 then it's ok The intellisense misled me. What is the difference between the 2 writings? Thanks ...
@OmkarUmbre5 жыл бұрын
Hi you shown how to add elements to the dictionary, can you please explain the purpose /use of the added elements.
@andyalmanza15172 жыл бұрын
Hi, great video. I ran into a problem I'm hoping you can help with. I added the Microsoft Scripting Runtime reference and created my dictionary variable the same way you did. However, the "Add" method is not available for my dictionary, why would that be?
@dangelorrrr5 жыл бұрын
Hi Paul - you need to edit your above video description... "In this Excel VBA video, we see how to use Class modules objects with Collections. One of the problems with collections is that it can only store one item from a row of data. So how to we store data from multiple columns? We use class module objects. "
@Excelmacromastery5 жыл бұрын
Thanks for pointing that out. Updated it now.
@bobkaplan2515 жыл бұрын
I thank you for explaining this so well as I've wondered for years what it did or was. But, I'm puzzled as to where I might use it. For example, I have a price list with 3,000+ items on it that I use repeatedly. I know the item number (key) so I've just been inputting that in the Excel Find option. Is there maybe some better way to use the dictionary to do this?
@Excelmacromastery5 жыл бұрын
Good to hear from you Bob. If you have a low frequency of finds e.g. manually finding the Excel Find is fine. For a high frequency though, the Excel Find is slow. For example, imagine you had a second list of 1000 items and you had to look up these in the first list. Then the dictionary would be very useful. You can see some examples at the bottom of this post: Excel VBA Dictionary(excelmacromastery.com/vba-dictionary) Show less
@Kralnor4 жыл бұрын
One major benefit of using a Dictionary is that lookups take constant time. That is, it doesn't matter how large the Dictionary is, looking up a certain key will always be practically instant. This is unlike arrays where you need to scan through the array.
@thescharfies3723 Жыл бұрын
top !!
@virtreal46633 жыл бұрын
How add to dictionary other dictionaries?
@H2Dwoat5 жыл бұрын
Hi, I saw you added the dictionary from the reference library. Do all users then have to add it to make use of the workbook?
@Excelmacromastery5 жыл бұрын
In practise is better to use Late Binding(i.e. CreateObject) instead of the reference when distributing to other users.
@UncleChopChop225 жыл бұрын
Hi thanks for the video.i see It is 1 of 5. Will the other be far away as I noticed others are being released.
@Excelmacromastery5 жыл бұрын
Hi next Dictionary video will be released in the next 2 or 3 weeks.
@UncleChopChop225 жыл бұрын
@@Excelmacromastery no worries. Look forward. Hope you stick to the vids. Been enjoying them. Easier to watch then some of the other drawn out vids on here.👍
@venusflytrap9093 жыл бұрын
Is there a method to apply a Like comparison to the value in the dictionary i.e. Dict item is "Shower" but like comparison would be Shower1 or Shower 2 etc - I have tried with no success adding wildcard to the dict item
@savaliyanirav96802 ай бұрын
My dictionary object always has one empty item in it. Also, I cannot remove that "Item 1" using : If Dict.Exists(" ") Then Dict.Remove " " ....... What is the solution?
@rrrprogram86675 жыл бұрын
Keep calm and learn vba
@Excelmacromastery5 жыл бұрын
:-)
@mrbubetube2 жыл бұрын
I think the Peter Norton look went out with the 1980s dude
@susantakumar83305 жыл бұрын
Hi Paul, I used late binding but I am getting object can't be created error message in office 365. Is there any solution? I can't use early binding bcz I need to distribute the Xlam file to my team.
@kingpin111114 жыл бұрын
Make sure you write set dict = CreateObject("Scripting.Dictionary") and not just set dict = CreateObject("Dictionary")
@arkabose11024 жыл бұрын
what if I want to add multiple values to a key in a dictionary? Like in python, I use key.append(xyz). How to do that in vba dictionary?
@ryanquinn12572 жыл бұрын
Your dictionary value probably ends up being a variant array or another collection or dictionary depending on use case. That kinda how my nested Jsons end up working
@enricomendiola99523 жыл бұрын
Hello Sir, If I have this kind of data how can I do it using Dictionary: Column Headers P1 with phone numbers P1 Type : Cell or Landline or Voip P1 Old: Yes or No Phone1, P1 Type, P1 Old, Phone2, P1 Type, P2 Old up to Phone10 Output Sheet1 Delete rows with P type: Voip Delete values with Type: Cell and Old: Yes Output Sheet2 From the original sheet Retain only Type: Cell and Old: Yes Then: if column Phone1, type and old has blank records cut and paste from Phone2, type2, old2 and so on to fill in blanks Can this be achieve using dictionary Sir?
@flemsflems46304 жыл бұрын
How can I write a formula in an excel cell to extract 1 item from the dictionary by using the key? I would think you you write something like this in a cell =(DD.name,key,position) then Apple would be in one cell.
@furzkram5 жыл бұрын
The audio level is on the edge of distortion. Remux and take it down by 20% please.