Using Vlookup to bring amounts from other workbook

JesseMS

New Member
Joined
Jul 20, 2022
Messages
10
Office Version
  1. 2013
Platform
  1. Windows
Hi,

I'm trying to create a template that works on bringing in information from various accounting programs, specifically a trial balance. The template has a link that changes the input file (using macros), and I'm using Vlookups to bring across the relevant accounts. The trial balance is set up like this:

Account CodeAccountAccount TypeDebit - Year to dateCredit - Year to date30 Jun 2021
200Milk Income Current YearSales834,954.79(722,441.85)
210Livestock Sales - CalfSales8,867.000.00
211Livestock Sales - CullSales32,110.60(27,994.99)
212Livestock Sales - Other LivestockSales0.00(91,750.00)
260IncentivesOther Income2,536.98(63,347.16)
274Fuel Tax Credits ReceivedOther Income734.00(1,621.00)

So for instance, using Vlookup in the template to pull through the Milk Income Current Year: Credit - Year to Date Amount:

Milk Income Current Year
=IFERROR(ROUND(VLOOKUP(B31,'[File.xlsx]Trial Balance'!$B$6:$E$80,4,FALSE),0),0)​

If I wanted to pull through multiple values, eg. All 3 livestock sales and combine them into one cell in the template, how would I do that? I want to leave the Trial balance as is, as many users will be using the template, and I want to reduce any extra steps if possible.

The Account Codes change per file, and some of the Account Names differ on each file as well. My solution to that so far has been to change the account name in the template Vlookup to match the Trial Balance.

Currently using Excel 2013, trying to get management to upgrade us to 2019.

First time posting, let me know if I should be asking this differently/adding anything!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Welcome to the MrExcel board!

let me know if I should be asking this differently/adding anything!
Only small thing is that sample data is better for helpers if you can use XL2BB

If I wanted to pull through multiple values, eg. All 3 livestock sales and combine them into one cell in the template, how would I do that?
Would something like this suit?

JesseMS.xlsm
ABCDEF
1Account CodeAccountAccount TypeDebit - Year to dateCredit - Year to date30-Jun-21
2Livestock Sales40,978.00
Sheet1
Cell Formulas
RangeFormula
E2E2=ROUND(SUMIF('[File.xlsx]Trial Balance'!B$6:B$80,B2&"*",'[File.xlsx]Trial Balance'!E$6:E$80),0)
 
Upvote 0
Solution
Welcome to the MrExcel board!


Only small thing is that sample data is better for helpers if you can use XL2BB


Would something like this suit?

JesseMS.xlsm
ABCDEF
1Account CodeAccountAccount TypeDebit - Year to dateCredit - Year to date30-Jun-21
2Livestock Sales40,978.00
Sheet1
Cell Formulas
RangeFormula
E2E2=ROUND(SUMIF('[File.xlsx]Trial Balance'!B$6:B$80,B2&"*",'[File.xlsx]Trial Balance'!E$6:E$80),0)
Thanks! I was stuck on vlookup, but that works great!
My IT guy is pretty cautious about letting users install their own software, but I'll see if I can convince him for XL2BB!
 
Upvote 0
You're welcome. Thanks for the follow-up. :)

.. and good luck with IT! 🤞
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,329
Members
452,635
Latest member
laura12345

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