dic

  1. B

    VBA code to Conactenate the data in a row by removing duplicates and sepearating it by comma.

    Hi, Can someone help me with VBA code to do the below task. I have data in A2-Z2 where in each there will be some data. this data in each cell migh be sepearted by comma. what i am looking for is to publish a out put in AB where it concatenates data from A2-Z2 by removing duplicates and...
  2. G

    VBA to count number of words in cell

    Hello, I am trying to find the vba to count the number ofwords in a cell, and have it run down to the last row. Manually I have worked out the formula which is which iscurrently in column AB =LEN(TRIM(P2))-LEN(SUBSTITUTE(P2," ",""))+1 I have been searching the internet, and found a code...
  3. B

    Unique Blanks

    Afternoon all This Script highlights Unique values in Range A:C - Only issue is that it also highlights blanks which are in the Dic. Is there a way to exclude prior to adding to dictionary I suppose? Thank You Sub hUnique()Dim lastrow As Long Dim r As Range Dim dic As Object lastrow =...
  4. T

    Adding to a dictionary

    My understanding of a dictionary is that they key is mandatory but its items are not. So why does this work: Dim DIC As Object Set DIC = CreateObject("Scripting.Dictionary") DIC.Add "MyKey", "MyItem" but not this: Dim DIC As Object Set DIC =...
  5. T

    Arrays

    Can someone please explain why this is fast: Dim DIC As Object Set DIC = CreateObject("Scripting.Dictionary") Dim MyArray() As Variant MyArray() = wksOutputForecast.Cells(2, 1).CurrentRegion.Resize(, 1).Value Dim n As Long For n = 1 To UBound(MyArray...
  6. A

    Graph VBA Problem

    I have this code that I used on another project. I tried to adjust the code on a project I'm working on however, I can't seem to figure out why its not working. The first project, my dates were in column A, however my new project has the dates in column D. Can anyone assist to help me figure...
  7. T

    Convert Dictionary Early to Late Binding

    The code below work in early binding: Dim DIC As Scripting.Dictionary 'Dim DIC As Object Set DIC = New Scripting.Dictionary 'Set DIC = CreateObject("Scripting.Dictionary") Dim MyArray() As Variant MyArray() = Sheet1.Cells(1, 1).CurrentRegion.Value...
  8. T

    Transfering dictionary to array

    The code below works to remove duplicates: Option Explicit Sub test() Dim DIC As Scripting.Dictionary Set DIC = New Scripting.Dictionary Dim MyArray() As Variant Columns(3).ClearContents MyArray = Cells(1, 1).CurrentRegion.Value Dim n As Long For n = 1 To UBound(MyArray, 1)...
  9. R

    compare and copy

    I am comparing each cell in 1 column to each cell in a 2nd column (ex: C5:C500 to R5:R100) and if they match copy A:M of the row that C was on to SHEET4. Then move on the next row. I have been getting help and now getting frustrated and running out of time. Here is what I have. How does it look...
  10. T

    Retrieve dictionary value using key

    My worksheet is as follows: Key Metric1 Metric2 1 a aa I am trying to retrieve a value using the dictionary's key: Dim dic As Scripting.Dictionary Set dic = New Scripting.Dictionary dic.Add Cells(2, 1), Cells(2, 2) Debug.Print dic.Item(1) but it does...
  11. R

    Code Not working

    The dictionary items are not showing Sub Tracker()Dim a, w(), i As Long, ii As Long, n As Long, z As String, ws As Worksheet, dic As Object Sheets("Tracker").Range("a6: b100000 ").ClearContents Set dic = CreateObject("Scripting.Dictionary") dic.CompareMode = vbTextCompare For Each ws In...

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