Extract Balance

Steve 1962

Active Member
Joined
Jan 3, 2006
Messages
379
Office Version
  1. 365
Platform
  1. Windows
Hi

Just need a formula in column I, that extract the last balance (based on end-of-month) from the table in A to F. Criteria should include Bank name (col A), Month (col C), Balance (col F).

Thanks


Book1
ABCDEFGHI
1BankYearMonthDateWhatBalanceMonthBalance
2Big20221/01/20225/01/2022x$37,445.121/01/2022$39,726.53
3Big20221/01/20225/01/2022x$37,445.121/02/2022$36,806.07
4Big20221/01/20225/01/2022x$39,979.031/03/2022$40,000.00
5Big20221/01/20227/01/2022x$39,879.03
6Small20221/01/20227/01/2022x$39,876.53
7Small20221/01/20227/01/2022x$39,726.53
8Big20221/02/20222/02/2022x$39,761.53
9Big20221/02/202214/02/2022x$36,806.07
10Big20221/03/20245/03/2022x$40,000.00
Sheet1
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
My bad. Yes A7 should be Big and based on Bank. Data may not be necessarily sorted.
 
Upvote 0
If A7 is Big then row 5 and 7 are duplicates based on the criteria, which one should it return?
Also, why is I4 = $40,000? the month in H4 is 1/3/22 where as C10 is 1/3/24.
 
Upvote 0
Thanks Cubist - I have now reviewed those data again. Just had an emergency at my place and I unfortunately, was distracted causing me to not double-check the values (rushed). All good now - I have now reposted an updated table.

To make things easier, the data in the table can be (and will be) sorted by DATE (column D).

The criteria that will be used to extract the desired balance will be -

BANK - Big or Small or other category
MONTH - Based on end-of-month DATE in column D (the required month to analyse will be in column H). The last entry in the database will be required (EG: for January, row 7).

With respect to the MONTH - the final date in the database, may not necessarily be the end-of-month date, For example, in the case of the database, the last entry for JANUARY 2022, is 7th (and not 31st).

Book1
ABCDEFGHI
1BankYearMonthDateWhatBalanceMonthBalance
2Big20221/01/20225/01/2022x$37,445.121/01/2022$39,726.53
3Big20221/01/20225/01/2022x$37,445.121/02/2022$36,806.07
4Big20221/01/20225/01/2022x$39,979.031/03/2022$40,000.00
5Big20221/01/20227/01/2022x$39,879.03
6Small20221/01/20227/01/2022x$39,876.53
7Big20221/01/20227/01/2022x$39,726.53
8Big20221/02/20222/02/2022x$39,761.53
9Big20221/02/202214/02/2022x$36,806.07
10Big20221/03/20225/03/2022x$40,000.00
Sheet1
 
Upvote 0
Note I've added a Bank column H for the criteria you want to filter on col A. Try:
Book1
ABCDEFGHIJ
1BankYearMonthDateWhatBalanceBankMonthBalance
2Big20221/1/225/1/22x$37,445.12Big1/1/22$ 39,726.53
3Big20221/1/225/1/22x$37,445.12Big1/2/22$ 36,806.07
4Big20221/1/225/1/22x$39,979.03Big1/3/22$ 40,000.00
5Big20221/1/227/1/22x$39,879.03
6Small20221/1/227/1/22x$39,876.53
7Big20221/1/227/1/22x$39,726.53
8Big20221/2/222/2/22x$39,761.53
9Big20221/2/2214/2/22x$36,806.07
10Big20221/3/225/3/22x$40,000.00
Sheet3
Cell Formulas
RangeFormula
J2:J4J2=XLOOKUP(1,($A$2:$A$10=H2)*($C$2:$C$10=I2),$F$2:$F$10,,,-1)
 
Upvote 0
Solution
Hey thanks Cubist for your time and patience. Works perfectly, first time.

Have a good week.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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