+ Reply to Thread
Results 1 to 10 of 10

Sum of several Vlookup values ...

Hybrid View

dollar Sum of several Vlookup values... 09-07-2009, 12:45 AM
DonkeyOte Re: Sum of several Vlookup... 09-07-2009, 01:54 AM
dollar Re: Sum of several Vlookup... 09-07-2009, 02:10 AM
DonkeyOte Re: Sum of several Vlookup... 09-07-2009, 02:27 AM
dollar Re: Sum of several Vlookup... 09-07-2009, 03:31 AM
  1. #1
    Registered User
    Join Date
    12-17-2008
    Location
    india
    Posts
    35

    Sum of several Vlookup values ...

    hi all,

    kindly have a look on the attached sheet.

    I need a macro to calculate the order value i.e when i fill in a qty against any code a macro would execute and get the rate of that code from (rate file worksheet) and multiply that value with the fill in qty and display it and also, when i fill in a qty against another code the macro should perform the same procedure but in this case it would add the value to the last value and show the combined total value for the order,


    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sum of several Vlookup values ...

    I would suggest posting a revised sample with some sample values and desired output - I don't understand the significance of the size column and/or how this affects in which column value for given code is to be placed.

  3. #3
    Registered User
    Join Date
    12-17-2008
    Location
    india
    Posts
    35

    Re: Sum of several Vlookup values ...

    Kindly Note :-= for category E :- The rates are same for all sizes
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sum of several Vlookup values ...

    The simplest thing would to be

    a) ensure your table has some sort of consistency - ie introduce Qty column for Cat E which sums Size columns

    b) use RateFile sheet to store values via SUMIF (efficient) and simply sum resulting column

    see attached
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-17-2008
    Location
    india
    Posts
    35

    Re: Sum of several Vlookup values ...

    we have a little problem (bug)

    we i enter the qty equal to any mentioned code i.e
    if i fill in 152 (152 is also a code of some item) in B5 the formula got corrupted and shows wrong value.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sum of several Vlookup values ...

    In that case, given your layout, either you would need to split the present SUMIF into 5 SUMIFs and sum results or you would need to revise the approach and revert to SUMPRODUCT such that you could differentiate between code & quantity based on column, eg:

    ratefile!C2:
    =$B2*SUMPRODUCT((MOD(COLUMN(Dollar!$A$5:$I$23),2)=1)*(Dollar!$A$5:$I$23=$A2)*Dollar!$B$5:$J$23)
    copied down as required

+ 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