VBA to vlookup and sum accross multiple worksheets

L

Legacy 287389

Guest
Hi good people!!,

I have this code:
Code:
Dim j As Integer, r As Range, k As Integer
Application.DisplayAlerts = False
Worksheets("sheet32").Delete
proceed:
Worksheets.Add
ActiveSheet.Name = "sheet32"
For j = 1 To Worksheets.Count
If Worksheets(j).Name <> "sheet32" Then
With Worksheets(j)
Set r = Range(.Range("A2"), .Cells(Rows.Count, "A").End(xlUp))
r.Copy Worksheets("sheet32").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
End With
End If
Next j
Range("A1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Range(Selection, Selection.End(xlDown)).Select
    ActiveSheet.Range("$A$1:$A$100000").RemoveDuplicates Columns:=1, Header:= _
        xlNo
    Selection.End(xlUp).Select
End Sub

this code looks at sheets 1 to 31 and extracts a unique list into sheet 32. I am looking to extend this code to also, vlookup the unique list in all the sheets and sum all totals for each name in the list.
I have looked on the net, found some examples but not quite what I can use. all and any help will be greatly appreciated!. Thank you all!
 
Last edited by a moderator:

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,215,338
Messages
6,124,358
Members
449,155
Latest member
ravioli44

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