+ Reply to Thread
Results 1 to 17 of 17

Reaching Target Total

  1. #1
    Registered User
    Join Date
    07-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    51

    Reaching Target Total

    I have a spread sheet that pulls data from a database. Due to the way the database displays the data I can not figure out how to reach my total dollar amount.


    Attached Is a Sample data set that closely resembles my data. Somehow someway I need the number in L8 to magicly appear. Becuase of the data that is pulled in I just cant figure out how to get it there.

    Purchase Order Sample.xlsx

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Reaching Target Total

    Perhaps explaining how you arrived at the figure in L8 would be beneficial?
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  3. #3
    Registered User
    Join Date
    07-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Reaching Target Total

    For PO 8.3 the total quantity is only 24 at a cost of $1472.64, and for PO39.7 the total quantity ordered is 48 at a cost of $588.48.

    It took the vendor 4 different shipments to fullfil my order of 24 screws on PO8.3. If I add Column H where Column I = 8.3 then i get $1472.64.

    For PO 39.7 I have only recevied 34 out of 48 washers. If I add column H where I=39.7 I only get $416.84, but my total dollars commited for those washers is $588.48.

    $1472.64
    + $588.48
    = 2061.12

  4. #4
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Reaching Target Total

    So, if I understand correctly, you want the sum of the TOTAL COST associated with each PART NUMBER that has been ordered. To do this, you can use the following formula in Cell N2, copied down as necessary:

    Please Login or Register  to view this content.
    This will generate a unique, distinct list of PART NUMBERS - ie, each part number from Column G will be listed once only.

    Then, in O2, and copied down as necessary:

    Please Login or Register  to view this content.
    will return the amount from Column B associated with the PART NUMBERS we have uniquely identified/listed.

    It's then just a matter of a SUM of the figures in Column O to return your figure of 2061.12.

    Have a look at the attached, which I hope helps.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Reaching Target Total

    This works great as far as returning the desired data, however, how can I make it Dynamic? I don't know from day to day how many rows i will have.

  6. #6
    Registered User
    Join Date
    07-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Reaching Target Total

    Quote Originally Posted by bremen22 View Post
    This works great as far as returning the desired data, however, how can I make it Dynamic? I don't know from day to day how many rows i will have.
    Im Sorry, but I must retract that statement.

    That formula causes my spread sheet to stop responding and it crases excel

  7. #7
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Reaching Target Total

    How many rows of data do you have?

  8. #8
    Registered User
    Join Date
    07-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Reaching Target Total

    right now 1864, but that number grows everyday

  9. #9
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Reaching Target Total

    Okey-doke, well I've just sat through 2 Excel crashes.... perhaps some others can shed some light on why this formula is so resource-hungry? (Apart from the range, of course, but it's "only" 10,000 rows.)

    Please Login or Register  to view this content.
    This appears to be the one that's the culprit.

    Any takers?


    EDIT: I suppose I'm just thinking out loud here, but I guess the problem could be that Excel is keeping count of all the (10,000) entries in Column G, in order to count them?

    @bremen: Could you do a cheap and cheerful copy from Column G, paste into an empty tab, and remove duplicates, to get your unique list to base calculations on?
    Last edited by BB1972; 07-22-2013 at 07:10 PM.

  10. #10
    Registered User
    Join Date
    07-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Reaching Target Total

    Quote Originally Posted by BB1972 View Post
    Okey-doke, well I've just sat through 2 Excel crashes.... perhaps some others can shed some light on why this formula is so resource-hungry? (Apart from the range, of course, but it's "only" 10,000 rows.)

    Please Login or Register  to view this content.
    This appears to be the one that's the culprit.

    Any takers?


    EDIT: I suppose I'm just thinking out loud here, but I guess the problem could be that Excel is keeping count of all the (10,000) entries in Column G, in order to count them?

    @bremen: Could you do a cheap and cheerful copy from Column G, paste into an empty tab, and remove duplicates, to get your unique list to base calculations on?
    Well, the data drives a few piviot tables and the "Total cost is one of the most important. If I can atuomate the process of copying, removing duplicates, and still have the totals in my pivit table I would be ok with it.

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Reaching Target Total

    I do not see why the formula could not cope with any row. It is more likely that the data may been imported from another application (Like SAP systems), or downloaded from a site.

  12. #12
    Registered User
    Join Date
    07-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Reaching Target Total

    Yes the actual data is pulled in from an Oracle database, but my sample is exactly houw it will look.

  13. #13
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Reaching Target Total

    But, you need to apply the formula in to your actual data.
    I had dealt with similar issues in this site. On two occasions, My Laptop had crashed twice. I strongly suggest, you should copy and paste values ONLY before you use these data in excel. If you leave it as it is, you will experience problems in the future. There are many non readable and non printable characters in data imported from another systems.
    Last edited by AB33; 07-23-2013 at 05:01 PM.

  14. #14
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Reaching Target Total

    @AB33 - good advice regarding pasting the data values.

    @bremen22 - I have acted on AB's suggestion, and redone the workbook (attached) using the data values only, with a list being calculated in Column N for up to 500 distinct unique values. I don't know if you will have more or less than that - adjust the range to suit. It's a little slow with "undo" actions, but otherwise seems fairly stable, and hasn't caused Excel to crash on me yet, unlike yesterday. How does this work for you?
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    07-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Reaching Target Total

    Quote Originally Posted by BB1972 View Post
    @AB33 - good advice regarding pasting the data values.

    @bremen22 - I have acted on AB's suggestion, and redone the workbook (attached) using the data values only, with a list being calculated in Column N for up to 500 distinct unique values. I don't know if you will have more or less than that - adjust the range to suit. It's a little slow with "undo" actions, but otherwise seems fairly stable, and hasn't caused Excel to crash on me yet, unlike yesterday. How does this work for you?

    Thanks. I will give this a shot in m actual dataset. Hopefully it works with all of the otehr calculations going on. I am currently up to column AN of calculated data.......

  16. #16
    Registered User
    Join Date
    07-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Reaching Target Total

    I tried this out and it still causes my sheet to crash.

    If I could get the count of unique lines i could calculate it that way

  17. #17
    Registered User
    Join Date
    07-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Reaching Target Total

    Quote Originally Posted by bremen22 View Post
    I tried this out and it still causes my sheet to crash.

    If I could get the count of unique lines i could calculate it that way

    I have been playing with this as i refuse to give up......

    If I add the formaula to a column in my table it crashes.

    If I add it to a column out side my table it works great, but it doesn't atuo populate for all rows in the sheet. If I just drag it down all the way to the bottom then the data repeats itself and it also causes excel to crash.

+ 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. [SOLVED] How would I modify calculation to have value = zero (0) after reaching a minimum.
    By Jim15 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-18-2013, 02:14 PM
  2. How to stop a graph plotting upon reaching a certain value
    By Omario in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-06-2013, 08:38 AM
  3. Replies: 0
    Last Post: 08-31-2011, 06:26 AM
  4. highlighting cells when reaching certain numbers
    By Chris01623 in forum Excel General
    Replies: 1
    Last Post: 08-24-2005, 07:05 AM
  5. [SOLVED] Reaching the end of the values in the sheet (end of the file value
    By Lucas Soler in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-13-2005, 04:06 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