+ Reply to Thread
Results 1 to 10 of 10

Vlookup & addition

Hybrid View

  1. #1
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Vlookup & addition woes

    Instead of stringing together Vlookups, you could string together SUMIF, like this

    =SUMIF($P$103:$P$144,A103,$S$103:$S$144)+SUMIF($T$103:$T$149,A103,$W$104:$W$149)+ ... etc
    Seeing that your ranges have a varying number of rows and the value in column A may or may not be present in the range, this will at least not produce errors. Althought it's still ugly ...

    In 2007 you could use SUMIFS with multiple arguments
    Last edited by teylyn; 12-28-2009 at 04:57 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    540

    Re: Vlookup & addition woes

    I;d go with Teylyn's approach-I came up with the following:

    =sumproduct(--(P104:p170=a135)*(S104:s170))+sumproduct(--(t104:t170=a135)*(w104:w170))+ {etc- repeat this pattern for your entire range)
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

+ 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