+ Reply to Thread
Results 1 to 9 of 9

Summing totals based on first 3 characters

  1. #1
    Registered User
    Join Date
    03-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    36

    Summing totals based on first 3 characters

    Hello Excel World,

    I am trying to make a dynamic invoice for a vendor of mine. I want them to be able to type in the quantities and part numbers in the invoice and have the invoice total the items automatically.

    If you look at my demo file you will see it is very simple.

    Basically I want the total column to fill in and sum up the QTY automatically based on the values in the legend on the right of the sheet.

    So for C2 it should look at the first 3 characters in B2 and then reference the legend and see that everything that starts with 131 should be 0.98 cents a piece and multiply the Qty of 50 by the 0.98.

    Please let me know if this information is too vague? I am trying not to over complicate. I just want to know how to cross reference and sum these up.

    Best Regards,
    G Dapp
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Summing totals based on first 3 characters

    for your example in c2
    =VLOOKUP(LEFT(B2,3)+0,$G$2:$H$5,2,FALSE)*A2
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    03-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Summing totals based on first 3 characters

    Quote Originally Posted by martindwilson View Post
    for your example in c2
    =VLOOKUP(LEFT(B2,3)+0,$G$2:$H$5,2,FALSE)*A2

    WOW! That was fast! Thank you so much!

  4. #4
    Valued Forum Contributor
    Join Date
    05-13-2010
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Excel 2003; 2007
    Posts
    441

    Re: Summing totals based on first 3 characters

    Sorry. same solution

    ory182003, Good evening.

    Try this one:

    C2 --> =A2*(VLOOKUP(VALUE(LEFT(B2,3)),$G$2:$H$5,2,FALSE))

    I hope it helps.

  5. #5
    Registered User
    Join Date
    03-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Summing totals based on first 3 characters

    Hi There again,

    There will be times when the invoice is not filled out all the way. Can you modify the code so the empty cells don't display the error (#VALUE!) ?

    Thanks again!

  6. #6
    Registered User
    Join Date
    03-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Summing totals based on first 3 characters

    Thank you!

  7. #7
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Summing totals based on first 3 characters

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Edit:
    LoL whoops on the second "="
    I removed it.
    Last edited by mikeTRON; 09-17-2013 at 10:11 AM.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Summing totals based on first 3 characters

    nearly!
    =iferror(VLOOKUP(LEFT(B2,3)+0,$G$2:$H$5,2,FALSE)*A2,"")

  9. #9
    Registered User
    Join Date
    03-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Summing totals based on first 3 characters

    You guys are amazing....really appreciate it!

+ 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. Excel 2007 : Summing totals on different worksheets
    By Chainsaw_019 in forum Excel General
    Replies: 6
    Last Post: 08-21-2011, 01:06 AM
  2. Summing Totals of Quantities
    By brian stanek in forum Excel General
    Replies: 2
    Last Post: 03-02-2010, 10:52 AM
  3. summing totals from codes
    By jspinx in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-25-2007, 08:02 PM
  4. [SOLVED] Summing Weekly Totals into Monthly Totals
    By steph44haf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-05-2006, 11:55 AM
  5. Help with Summing Up Totals
    By sabunabu in forum Excel General
    Replies: 4
    Last Post: 12-12-2005, 11:10 AM

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