+ Reply to Thread
Results 1 to 17 of 17

Need Execel to do math and spit out Data

  1. #1
    Registered User
    Join Date
    06-21-2017
    Location
    Oregon, USA
    MS-Off Ver
    Office 365 Subscription
    Posts
    9

    Need Execel to do math and spit out Data

    First time I'm posting here, not sure if I'm in the right place.

    I have a problem I think is basic but not sure how to solve it. I do mailing services at the company I work for and a certain type of mail service (EDDM), requires us to make forms called 'facing-slips'. When our software spits out reports there is a section that covers delivery routes. These are the actual walking routes that a postman will take while out delivering mail. Some are large routes, others not so much.

    I have attached three files. The (Working) excel file has data in it that I would use to create the data to plug into the PDF sample that is also attached. The (Need) excel file is an example of what I need to have output by excel.

    Finally, this is what needs to happen!
    In the Excel file there are only three columns that are important, Zip | CRRT | Total Residential. If you look in row 4 you will see the CRRT is C012 and the Total Residential is 1,262. I'm only using this line in the example because it's a larger number. Each Route will get a sack of bundled mail pieces, in this case C012 would have a sack with 5 bundles. Each bundle needs to have a facing slip and in this case the max number of mail pieces is 250/+ but not greater than 300.

    I need excel to divide 1,262 by 250 and determine that would be 4 bundles of 250 and 1 bundle of 262. Then I need it to create 5 rows in a spread sheet that have the: Zip | CRRT | Total # of Pieces Per Bundle | Bundle number | Total Bundles as the columns of information.
    It would need to do this for every row in the excel file. I would then need to be able to create a PDF and import the data from Excel so I can have a single file that has all of the facing slips in the order of the CRRT sequence that is in the original working file.

    Is this crazy to do out of Excel? Any ideas would be helpful. As of now all of these slips need to be filled in by hand and when doing a project with half a million pieces of mail it takes a couple days to complete.

    Thank you in advance for any ideas or solutions!

    P.S. I forgot to attache the files and now I'm not sure how to do it. If you read this and have ideas I can send you the files to review. Thanks again!
    Attached Files Attached Files
    Last edited by ram-estimating; 06-21-2017 at 07:32 PM. Reason: Forgot Attachments

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need Execel to do math and spit out Data

    Hi and welcome to the forum.

    You will need to add the files so that we can be sure what we're working with.
    Edit your post, choose Go Advanced and underneath the post look for the Manage Attachments option and take it from there.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    06-21-2017
    Location
    Oregon, USA
    MS-Off Ver
    Office 365 Subscription
    Posts
    9

    Re: Need Execel to do math and spit out Data

    Thank you for the info and the welcome!!

  4. #4
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Need Execel to do math and spit out Data

    Hi ram-estimating,

    I combine both excel to sample tab, working tab and formula tab(result).

    First, it have two helper column in the working tab, in the front of data (column A, due to limitation of vlookup), and the last column (column I)

    in A2, key in below formula and paste to last row+1, (ie. if have 10 row of data, copy to 11th row)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This is to determine the first row of each "CRRT" and the last row of "CRRT" needed.

    in I2, key in below formula and paste to last row
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This is to find how many bandle need for each "CRRT"

    Mod is find the remain amount after divide (ie, Mod(5,2) the result is 1)

    helper column done, now the result part

    in formula tab, have to add in one column in front.(column A)
    in A2 to last row put down the series number (ie, 1,2,3,4,5....) till the last number in the Working tab column A (ie, this workbook is A22, value is 21)

    in D2, key in below formula and paste to last row
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The false vlookup perform the repeat of "CRRT"

    in C2, key in below formula and paste to last row
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It find the Zip value in working tab based on column D

    in E2, key in below formulaand paste to last row
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    it check whether the remain value is exceed 300, if yes, 250, if not will show remain that less than 300.

    in F2, key in below formula and paste to last row
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It count the occurrence of "CRRT" from top to end

    in G2, key in below Array formula and paste to last row
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It find the max value in column F, by same "CRRT"


    PS: array formula is need to confirm by Ctrl + Shift + Enter

    If not understand, please follow below step:

    1, Paste the formula to the cell
    2, Double click on the cell
    3, press Ctrl + Shift + Enter
    It show { sign in front of formula. (ie "{=ind.....)
    Last edited by BoredWorker; 06-24-2017 at 09:39 PM.
    Hope you can learn every time you visit here.

    If you still confuse on how it work, kindly ask or go to
    i) Formula - Formula (Ribbon) > Formula Auditing (Section) > Evaluate Formula > Evaluate; or
    ii) VBA/Code - Click F8 to see how it work step by step.

    It it take care of your question, Please:
    Mark tread as [Solved] [Thread Tools->Mark thread as Solved]
    ;and
    Click *Add Reputation to thank anyone solved your question.

  5. #5
    Registered User
    Join Date
    06-21-2017
    Location
    Oregon, USA
    MS-Off Ver
    Office 365 Subscription
    Posts
    9

    Re: Need Execel to do math and spit out Data

    This is absolutely perfect! It does exactly what I was asking for! Greatly appreciated

  6. #6
    Registered User
    Join Date
    06-21-2017
    Location
    Oregon, USA
    MS-Off Ver
    Office 365 Subscription
    Posts
    9

    Re: Need Execel to do math and spit out Data

    So I am working with this trying to apply your idea to a larger list but it is not working. I am seeing in some of the formulas I need to adjust portions to match the new last row in my new project. I have figured out the correct things to change until I get to the D2 Column in the workbook. Even if I update what looks obvious to the last row it only works as far as the sample that you gave me.

    If you could make the changes to the example I am uploading I think I will be able to dig through all of the formulas and find out what I will need to change each time I do a list. They vary in size every time.

    Thank you again for any help!!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-21-2017
    Location
    Oregon, USA
    MS-Off Ver
    Office 365 Subscription
    Posts
    9

    Re: Need Execel to do math and spit out Data

    I made a mistake in my reply. It isn't the D Column it is the E column.

    this is the formula that I am stuck on:
    =IF((INDEX(Working!$F$2:$F$7,MATCH(D2,Working!$C$2:$C$7,0))-SUMIF(D$1:D1,D2,E$1:E1))>300,250,INDEX(Working!$F$2:$F$7,MATCH(D2,Working!$C$2:$C$7,0))-SUMIF(D$1:D1,D2,E$1:E1))

    Thank you!

  8. #8
    Registered User
    Join Date
    06-21-2017
    Location
    Oregon, USA
    MS-Off Ver
    Office 365 Subscription
    Posts
    9

    Re: Need Execel to do math and spit out Data

    Actually, never mind. I figured it out finally!
    Thanks again!

  9. #9
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Need Execel to do math and spit out Data

    duplicate post
    Last edited by BoredWorker; 06-24-2017 at 09:39 PM. Reason: duplicate post

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: Need Execel to do math and spit out Data

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  11. #11
    Registered User
    Join Date
    06-21-2017
    Location
    Oregon, USA
    MS-Off Ver
    Office 365 Subscription
    Posts
    9

    Re: Need Execel to do math and spit out Data

    Hello BoredWorker!
    I sent you a private message but not sure it sent. I'm having a problem trying to adapt your formula to a new project and I'm in desperate need of a solution.
    The project goes to press in the morning and I don't have time to do all of the slips by hand. I have uploaded the excel file that I need to have work the same way you showed me originally.
    If there is anyone that can help me out it would be greatly appreciated!!
    Attached Files Attached Files

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,543

    Re: Need Execel to do math and spit out Data

    I have adapted the formulas from post #4 to the file attached to post #11. You'll need to see if the results look like what you would expect.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  13. #13
    Registered User
    Join Date
    06-21-2017
    Location
    Oregon, USA
    MS-Off Ver
    Office 365 Subscription
    Posts
    9

    Re: Need Execel to do math and spit out Data

    Thank you for the response JetMc!

    What you came up with is what I was getting as well. When looking at the formula page, F2 should be 1 and G2 should be 1 as well. F3 should be 1 and G3 should be 1.
    And how it repeats down the list is that it creates a row for the total number of bundles of 250 plus thebalance that it gets from the Working sheet.

    I'm not sure where it is breaking or why...I played with it this weekend and it worked every time. However, I didn't have any numbers under 100 and I'm thinking that has something to do with it but I;m not sure.

    Thank you again for taking a look!

  14. #14
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,543

    Re: Need Execel to do math and spit out Data

    F2 and F3 are 1, at least on the copy of the file that I am looking at.
    Could you tell us why G2 and G3 should be 1?

  15. #15
    Registered User
    Join Date
    06-21-2017
    Location
    Oregon, USA
    MS-Off Ver
    Office 365 Subscription
    Posts
    9

    Re: Need Execel to do math and spit out Data

    All of the numbers in column G should match its corresponding Zip and CRRT number from the working sheet. The formula is supposed to look at the total pieces column from any given row on the working sheet and determine if it will be a single bundle, which would be less than 250, OR figure out how many bundles of 250 it should be up to 300. and then make the last bundle quantity on the formula page match the balance.

    The first post in this thread explains it in greater detail and includes a sample of what it should look like on the formula page.

    Thank you for the response!

  16. #16
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,543

    Re: Need Execel to do math and spit out Data

    Take a look and see if this has things sorted out.
    Let us know if you have any questions.
    Attached Files Attached Files

  17. #17
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Need Execel to do math and spit out Data

    Hi,

    sorry, the main reason is I did not know the name of CRRT have duplicate value.
    I had edit abit to suite your case,
    But JeteMc is have the easier way to do it, so I better further explain a bit on his work instead of mine.

    He change the C3 with
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    formula that act similar to D2, find value based on the ref#

    and E3 change to array formula,
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    my one is only search the first value of CRRT, it not suitable to duplicate value.
    JeteMac formula is compare to the Zip as well, the double match function will eliminate the duplication.

    hope you understand how it works.
    Last edited by BoredWorker; 06-27-2017 at 09:39 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Formula to compare two columns and spit back data from third.
    By brendine in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-06-2015, 07:32 PM
  2. Spit data entry up
    By thmehr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2014, 10:01 PM
  3. Spit data entry up
    By thmehr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-26-2013, 09:43 AM
  4. Replies: 1
    Last Post: 02-07-2013, 07:46 PM
  5. Replies: 3
    Last Post: 02-16-2006, 07:00 AM
  6. data from userform to a cell on an execel sheet
    By David Marshall in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2006, 12:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1