Have a 156 account numbers, I need to calculate the totals based on the last 4 digits... but wait there's more

moonlight6

New Member
Joined
Apr 19, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
So, I have 156 account numbers with 17 digits. The only numbers that matter on the account number are the last four digits. I need to take the balance of each number and sum them together based on the last four digits or a range of the last four digits. For instance, say I have
12 0000 0000 000 1110
10 0000 0000 000 1116
21 0000 0000 000 1790
61 0000 0000 000 1171
33 0000 0000 000 3803

I need to add the balances of any account number ending between 1110-1119, 1700-1799. I need to add the balances of any account number ending 1171. How do I get it to add them based on this? I'm trying to find the easiest way possible, if possible. Thanks for your help!!!!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
1713549314199.png
 
Upvote 0
A sample of your data with 8-15 Records uploaded using XL2BB so that we don't have to try and create what you already have would be really helpful. Then using XL2Bb provide us with a mocked up solution of what you want the result to look like.
 
Upvote 0
I'm not sure I will be able to us the XL2BB without my IT people stepping in. Here's an example of how I was getting it to work. This required me to sort and pick for instance numbers ending 1110-1119 and then adding them. But not table I do will have the same ending numbers. This one only had 1111 and 1114. The next one may have 1113 and 1118. So, I'm trying to find a way either function or code that will add them up based on the last 4 digits of the account number. And either a set number or a range.
=SUM('Table 1'!M2,'Table 1'!M3,'Table 1'!M4,'Table 1'!M5,'Table 1'!M94,'Table 1'!M112,'Table 1'!M122)
1713553245103.png
 
Upvote 0
I will add that the calculated range/set numbers will be the same across the board. It's just the account numbers that may change dependent on the table I'm using.
 
Upvote 0

Forum statistics

Threads
1,223,882
Messages
6,175,166
Members
452,615
Latest member
bogeys2birdies

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