Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

# Vlookup and sumif

Posted on 2011-09-15
Medium Priority
252 Views
I have two workbooks.
Workbook One is called Summary and is located at C:\Month. I have a tab labeled MS Aug. In MS Aug column A represents the account number. An example of an account number would be 4025RM28 (there are many more account numbers beginning with 4025.) In the same tab column G represents a balance in for each different 4025 account.
Workbook Two is called CD Spreadsheets. In CD Spreadsheets I have a tab labeled #20. In cell L5 I need to sum all the values from the Summary workbook, where the first four digits are “4025” from the Summary workbook from A3:A640 and place that sum in L5 in the tab labeled #20.
In other words, in the CD Spreadsheets at L5 go to the Summary workbook, tab MS Aug and add all the values in column G where the first four digits in column A = 4025 in the Summary workbook tab MS Aug.
0
Question by:Frank Freese
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 5
• 3

LVL 50

Expert Comment

ID: 36544893
Hello fh freese

Normally this can be done with SUMIF function and a wildcard but if the source workbook might be closed SUMIF won't work so SUMPRODUCT might be the best bet...try this formula in L5

=SUMPRODUCT(LEFT('[Summary.xls]MS Aug'!A\$3:A\$640,4)="4025")+0,'[Summary.xls]MS Aug'!G\$3:G\$640)

regards, barry
0

Author Comment

ID: 36544957
barry,
got an error at G\$640
0

Author Comment

ID: 36545027
no error now? but no values, yet - off to the dentist but check out tonight
0

Author Comment

ID: 36545041
sorry barry, still getting error
0

LVL 50

Accepted Solution

barry houdini earned 2000 total points
ID: 36545159
Oh, apologies! I left out a parenthesis at the beginning - should be like this

=SUMPRODUCT((LEFT('[Summary.xls]MS Aug'!A\$3:A\$640,4)="4025")+0,'[Summary.xls]MS Aug'!G\$3:G\$640)

regards, barry
0

LVL 50

Assisted Solution

barry houdini earned 2000 total points
ID: 36545330
Note: I assume initially that you will have both workbooks open - then the above formula should work. If you then close the Summary workbook the formula will change automatically to show the whole path for Summary .....and the result will still display.

regards, barry
0

Author Comment

ID: 36546619
I think I got it!
0

Author Closing Comment

ID: 36546620
thank you!
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
###### Suggested Courses
Course of the Month8 days, 11 hours left to enroll