+ Reply to Thread
Results 1 to 10 of 10

Attributing Values and multiplication

  1. #1
    Forum Contributor
    Join Date
    04-25-2007
    Location
    Cardiff, South Wales
    MS-Off Ver
    Excel 2010
    Posts
    111

    Attributing Values and multiplication

    I am writing a spreadsheet as a report for a customer and i want to show the following in the sheet.

    A customer buys 12 of XProduct (retails £2)
    A customer buys 15 of YProduct (retails £3)
    A customer buys 20 of ZProduct (retails £5)

    I want the sheet to have columns stating - Amount Bought - Product - Gross Amount.

    And i want to be able to have the product column intelligent enough to know that if i type any of my products sold it will automatically attribute the correct cost (i.e. I type in Xproduct and it knows that value is £2) so that in the Gross Amount column it will all make sense, and save me having to manually put in the retail cost each time which will occasionally change. At present i have the same three columns and i multiply the Amount Bought with what i know is the cost and do the sum myself and then enter the result in excel - so i want to save time. Can this be done?

    I am new to excel, hope you can help

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You can up a table of products vs. prices and then use Vlookup function to look up the prices from the table as you type in the product name.

    See Vlookup in Excel help for details.

    an example would be....

    e.g. =Vlookup(lookup_product,product_price_table,2,0)*amount_bought.

    replacing the names with actual cell references and ranges....
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    04-25-2007
    Location
    Cardiff, South Wales
    MS-Off Ver
    Excel 2010
    Posts
    111
    Thanks for pointing me in the right direction, but that only made my scratch my head even more. I suppose I am really trying to say that i only know how to do the most basic of formulae and not sure where to start with Vlookup if indeed it is the most obvious, simple, and best method.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Can you attach a zipped sample of your sheet? I can put in some sample formulas for you to ponder.

  5. #5
    Forum Contributor
    Join Date
    04-25-2007
    Location
    Cardiff, South Wales
    MS-Off Ver
    Excel 2010
    Posts
    111
    Ok, i have attached the zip file for your consideration. As you will see, the elements i ideally would like costs attached too are in the Content Sold area - Wallpaper, Games, Ringtone etc. with costs for each.

    Many thanks
    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You have 3 different costs for Wallpaper...how do you differentiate?

  7. #7
    Forum Contributor
    Join Date
    04-25-2007
    Location
    Cardiff, South Wales
    MS-Off Ver
    Excel 2010
    Posts
    111
    Well, the wallpaper is a cost of £2 each and that follows with all three examples. The columns i am concerned with are Downloads, Type and customer cost and in that sequence, wallpaper costs the £2
    Last edited by Sionos; 04-25-2007 at 09:05 AM.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    See sample attached.

    I added a simple table in L1:M5...you can expand this table, but you will have to expand the range in the formula, correspondingly.

    Here is the formula I used in D21 copied down.

    =VLOOKUP(C21,$L$1:$M$5,2,0)*B21
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    04-25-2007
    Location
    Cardiff, South Wales
    MS-Off Ver
    Excel 2010
    Posts
    111
    Thank you very much for your help. All i need to know now is how that formula does what it does, so that if i do something similar i can replicate it. Thanks anyway.

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    =VLOOKUP(C21,$L$1:$M$5,2,0)*B21
    this formula looks up the string in C21 and looks for it in range L1:M5 (but in the 1st column). If it finds a match, it returns what's in column 2 of the range (which is Column M, in this case). The 0 at the ends is the same as entering FALSE as the argument. This means look for an exact match. The whole thing is then multiplied by the quantity in B21 to get a total.

    If you read the help files on Vlookup function, you will understand it better.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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