Vlookup and sum across tabs??

erniepoe

Active Member
Joined
Oct 23, 2006
Messages
375
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Have a problem and am wondering if there is an easy solution.

On Sheet 1 I have a column listing store numbers, there are about 250 numbers. In the same workbook are also 250 sheets corresponding to each store, but the tab is the store name, not the store number.

The store number is in cell C3 on every tab.

I am wondering if there is a way to match the store number from the Summary Sheet to have it vlookup across all tabs in cell c4, and when it finds the match, to sum up row 53 from columns F to O.

I'm hoping there is a formulaic solution and I wont have to do this manually, but such is life I suppose.

A million schrute bucks to anybody who can help?

Much obliged and happy new year y,all!
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
One option would be to use a UDF
Code:
Function SumShts(StoreNum As String) As Double
   
   Dim Ws As Worksheet

   For Each Ws In Worksheets
      If Not Ws.Name = "[COLOR=#ff0000]Sheet1[/COLOR]" Then
         If Ws.Range("C3").Value = StoreNum Then
            SumShts = WorksheetFunction.sum(Ws.Range("F53:O53"))
            Exit For
         End If
      End If
   Next Ws

End Function
This needs to go in a standard module (change the sheet name in red to suit) & then in your sheet enter the formula as shown below



Excel 2013 32 bit
AB
1Store NumberTotals
21041609.07
311216657
4120
5130
Sheet1
Cell Formulas
RangeFormula
B2=SumShts(A2)
 
Upvote 0
this is amazing, thank you so much Fluff! Much appreciated, and have a great week!
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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