Hi, Following a query, I'm trying the code below and I find out that the "aaa" array is dimensionned with 1,049,574 as worksheet wsb column 1 hold 1,000 values, but it doesn't hold values from wsb worksheet. Is there any other way to get all the 2 columns from 2 different worksheet into a scripting dictionary for processing unique values?
--- Sub makeData() Dim wsa As Worksheet Dim wsb As Worksheet Dim ra As Range Dim rb As Range Dim c As Range Dim i As Long Dim cnt As Long With Application .ScreenUpdating = False .Calculation = xlCalculationManual .DisplayAlerts = False End With 'ThisWorkbook.Worksheets.Add(after:=Worksheets(Worksheets.Count)).Name = "MSH1" 'ThisWorkbook.Worksheets.Add(after:=Worksheets(Worksheets.Count)).Name = "MSH2" Set wsa = ThisWorkbook.Worksheets("MSH1") Set wsb = ThisWorkbook.Worksheets("MSH2") cnt = wsa.Rows.Count 'Set ra = wsa.Range(wsa.Cells(1, 2), wsa.Cells(Rows.Count, 2)) Set rb = wsb.Range(wsb.Cells(1, 2), wsb.Cells(1000, 2)) i = 0 For Each c In rb c.Value = i i = i + 4 Next c With Application .ScreenUpdating = True .Calculation = xlCalculationAutomatic .DisplayAlerts = True End With End Sub --- Pascal Baro -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com