View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
herman herman is offline
external usenet poster
 
Posts: 3
Default Sum of vlookups across all worksheets.

Good morning,
Could you help me with the following problem ?
In cell A2 of sheet "TOTALS" I want to add up the results of a vlookup
funtion across multiple worksheets.
Thus A2 = vlookup(A1;sheetB!$C:$H;false)+
vlookup(A1;sheetC!$C:$H;false) + vlookup(A1;sheetD!$C:$H;false)
+....... + vlookup(A1;sheetX!$C:$H;false).
X is variable, meaning that sheets may be added or deleted.
Note that the arguments remain constant except for the sheets where
the values are to be looked up.
I don't think this can be handled with any combination of worksheet
functions. Is that right ?
Can anyone help me out here with the most efficient code ?

Thank you very much in advance.
Herman