dictionary

  1. V

    Argument not optional - Dictionary and Classes

    Hello everyone! I'm fairly new to VBA, and I'm currently experimenting with Classes and Dictionaries. However I encountered a problem, that for once, I was not able to solve using the infinite amount of ressources available on the internet. Whenever I run my macro, I get the "argument not...
  2. D

    Assigning dictionary data to an array...

    Greetings to all, When using an Excel dictionary, and when using either the .Items or the .Keys methods to assign the dictionary's items or keys to an array, will the array always be cleared of any existing data before the assignment is made? I'm working on a program which loops through data...
  3. Manuel Cavero

    How to calculate the Correlation of multiple Dictionaries?

    Hello everyone: I have some dictionaries with values, and I need to calculate the correlation between the values of dictionaries. Let's see the code: Sub Test() Dim Dic1 as New Scripting.Dictionary Dim Dic2 as New Scripting.Dictionary Dim Dic3 as New Scripting.Dictionary Dim Dictionaries as...
  4. S

    Scripting Dictionary as a vlookup

    Hi, I was wondering if it is possible to create a scripting dictionary that is equivalent to a vlookup for a report that I am trying to create. Basically I have my Sheet1 where I have my list of "ID" then some other data, and the new amount, which is taken from from Sheet8 - a data dump I get...
  5. S

    Creating a dictionary of all the values from a column

    there is going to be a data in A column of current sheet containing unique values. I want to add all these already existing unique values to a dictionary and use each of the unique value as a criteria for filtering in next sheet. How to add all the values of A column to the dictionary? and how...
  6. Manuel Cavero

    Problem with a Dictionary in a Class

    Hello everyone: I have two differents subs, each one calls to a different class to build the same object. The unique difference between both is the type of item used to load the dictionary inside the class. Let's have a look on the first one: In the first one the dictionary is located inside a...
  7. H

    Modify data that a vba macro copies between sheets

    Hi. I am having some issues with VBA. I use an Excel formula found on this forum to find the Nth to last word in a cell. The formula is: TRIM(LEFT(RIGHT(" "&SUBSTITUTE(TRIM(CELL REFERENCE);" ";REPT(" ";60));60*n);60)) My VBA script finds specific strings from Sheet1 and copies these to their...
  8. T

    Looping for speed

    I read that purely for speed purposes, you should use a For Each loop when looping through a collection. For arrays, use a For Next loop. What about for a dictionary? Which is faster? Thanks
  9. C

    Using IF condition in VBA Dictionary

    Hi, Im using the VBA dictionary to make a summary report by salesrep for quantity and value. The problem is if I put an IF condition testing for the year to be 2017, one of the values comes wrong. If I remove the IF condition the code works fine and gives all the correct results. Is there a...
  10. A

    How to check if string contains key value from dictionary?

    Hello all, i have table like this: <tbody> <tbody> texttexttextKEYVALUEtexttexttext </tbody> here i need fill value of item for if the key is found in text in column A <tbody> texttexttextKEYVALUEtexttexttext </tbody> here i need fill value of item for if the key is found in text in...
  11. C

    Dictionary in VBA

    Hi, I'm using the dictionary in VBA to summarize based on the units held in one column, but I would also like the code to summarize by amount, which is in another column, can I do this in the same sub and output both the results by name for units and amount. I have pasted the example how the...
  12. dreid1011

    VBA learning how to use Dictionary. Help please.

    Good morning, As the title implies, I am learning how to use the dictionary object. And in doing so, my end goal is to count the number of unique entries in a 2d array with multiple criteria so that I can redim an output array to the appropriate size. With that being said, please do not just...
  13. C

    Excel Dictionary - copy from sheet 1 to sheet 2

    Hi all, I have a client comments in sheet Client Comments that I would like to paste to sheet All Comments. Client ID's are in Column AV and comments in Column CE in both sheets. The code below takes 13 minutes and doesn't paste any comments so would appreciate any support. In Phase 1, I'm...
  14. D

    Speak XML dictionary

    Good day this use to Translate Languages CreateObject("MSXML2.XMLHTTP") how to be used for Speak language Tanks
  15. M

    Sorting Data from Multiple Pages by Date Based on Description

    Hello, I am attempting to generate an organized list of all entries from multiple sheets which have a date, vendor, cost, category, subcategory, and notes. I am looking to have them sorted by date based upon their vendor, and to display the original date, notes, and cost of the data which...
  16. A

    Is it possible to return a value from a Function "ByVal" and not "ByRef"

    Hi, My question might sound a bit illogical and even I never thought about something like this before I encountered a problem myself. Let me try to explain what I am looking to do. Here is the code I have, it is only one function and there are a few others in the module but I think this should...
  17. T

    Add array elements to dictionary

    Hi Friends, I am facing a error "Subscript out of range". I am trying to add array names to dictionary. column_arr_1 = Array("X1", "Y2") column_arr_2 = Array("Z3", "A1") column_arr_3 = Array("B1", "C1") column_arr = Array(column_arr_1, column_arr_2, column_arr_3) For i...
  18. L

    How to make word that is not in dictionary to be UNDERLINED?

    The following VBA can change word that is not in dictionary to RED: Sub zz() <code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;">Dim ws As Worksheet, rng As Range, s$, w$ Set ws = ActiveSheet For Each rng In ws.UsedRange If...
  19. M

    vba Dictionary - understanding the code

    Hi Team, I am learning VBA Dictionary and trying to understand the below line. I stuck only with with word Nothing. Can you someone tell what that Nothing word means. With Dict For Each Cl In Sht2.Range("A2:A" & sht2UsdRws) If Not .exists(Cl.Value) Then .Add Cl.Value...
  20. B

    Items not being added to dictionary

    Hi All, I have the below which is supposed to be adding a range of text values to a dictionary however when I debug.print it nothing is being added. list1 is defined as a variant. Set d = CreateObject("scripting.dictionary") list1 = ThisWorkbook.Sheets("Summary").Range("A7:A22").Value For...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top