looking to write a formula to sum a total of range based on the last three digits of an account number?
Thanks
Excel Question 1.JPG
looking to write a formula to sum a total of range based on the last three digits of an account number?
Thanks
Excel Question 1.JPG
Hi and welcome to the forum
Pictures are of little value. Honestly, no one wants to re-type your data to try and solve your issue. Additionally, we would only be guessing at how your data was structured, ie. formulas, formatting, etc. Additionally, due to how some browsers behave, many of our members cannot see uploaded pictures/images. Please do not take this route.
Please attach a sample file that represents what you have. The structure of your attachment should be the same structure as your actual data. Any proprietary information should be changed.
Include in the attachment any code you're currently using (whether it works or not) and an "After" of what you wish the output to be.
To attach a file to your post,
click advanced (next to quick post),
scroll down until you see "manage file",
click that and select "add files" (top right corner).
click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"
Once the upload is completed the file name will appear below the input boxes in this window.
You can then close the window to return to the new post screen.
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
It does, thank you.
looking to sum based on the last 3 characters in Column A. Please let me know
how about this... =SUMIF(A:A,"*011",C:C)
Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
Sam Capricci
Wow, looks like I made it far more complicated then it needed to be. Thanks
This will also work if you just want to point it at a cell instead of hard coding it...
=SUMIF(A:A,"*"&F3,C:C)
AND, thank you for the rep!
Last edited by Sam Capricci; 02-04-2021 at 11:30 PM.
What does the middle part represent? "*11" Say I wanted to do the first 3 numbers? Would I need to change anything besides the actual numbers I am looking for? or just write it "*497"
for first three digits
=SUMIF(A:A,"497*",C:C)
Pl note
Array formula should be confirmed with Ctrl+Shift+Enter keys together.
If answere is satisfactory press * to add reputation.
Middle part:
"*11*" : 11 is in middle
or
"??11?" (hardcode "2 digits&11&1 digit"
"*11" 11 is from the right
"11*" 11 is from the left
Quang PT
with power query
Excel 2016 (Windows) 32 bit
A B C 1Column1 Column2 Salary Sum 2010 Accounting/Admin 5001191.26 3011 Dispatch 2147094.3 4052 HH Customer Service 781140.1 5012 Safety 119999.88 6050 Sales 1391985.92 7015 Driver Support 69999.8 8016 HH Claims 48500.14 9017 Fleet Admin 34320 10018 Training 11020 EL Trailer Drivers 3152142.24 12021 EL S/T Drivers 1286836.98 13051 Customer Service 1100064.16 14022 EL Trailer Drivers 52000 15055 Information Technology 764404.16 16023 HH S/T Drivers 17027 Telecobuy Dedicated Trailer Drivers 147680 18046 EL Warehouse 3759856.88 19030 EL Helpers 294112 20031 HH Helpers 178880 21032 EL Summer Helpers 22033 HH Summer Helpers 23035 Corporate Facilities 395047.9 24039 LF Installer 1838184.4 25040 HH Warehouse 141398.4 26045 P/T Warehouse 101836.8 27048 EL Warehouse(Chicago) 391560 28056 Billing 335484.76 29053 Marketing 30054 MTS Protection One 31057 TAG TONNAGEACCEPTANCEGROUP 32058 Business Development 149999.98 33060 Shop 265760.3
Sheet: Merge1
Mcode to sum by account type
Mcode to merge the tablesPlease Login or Register to view this content.
Please Login or Register to view this content.
Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").
It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.
- Follow this link to learn how to install Power Query in Excel 2010 / 2013.
- Follow this link for an introduction to Power Query functionality.
- Follow this link for a video which demonstrates how to use Power Query code provided.
The asterisk "*" acts as a wild card. Put before the 011 like "*011" means that it will look for everything with a 011 ending and whatever to the left of it.
Same for the right, "011*" would act as a wild card looking for everything that starts with a 011...
Hope that helps.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks