+ Reply to Thread
Results 1 to 5 of 5

vlookup and sumif - based on cell content

  1. #1
    Registered User
    Join Date
    12-09-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    21

    vlookup and sumif - based on cell content

    Hi

    I want to add a vlookup and sum formula into the colum highlighted in red...

    basically the user is required to select what type it is in the first colum and if the reply is portfolio he/she will be requested to fill out the next colum which is the portfolio ID... I then want the column highlighted in yellow to sum all the "values" of the same portfolio ID.

    If possible the sum would only be given in thethe "FIRST" row where the portfolio ID is used for the first time...

    find attached the example

    hope someone can help!
    thanks
    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: vlookup and sumif - based on cell content

    in e6 filled down
    =IF(COUNTIF($C$6:C6,C6)=1,SUMIF($C$6:$C$100,C6,$D$6:$D$100),"")
    "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
    12-09-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: vlookup and sumif - based on cell content

    Thanks a lot - one more question - is there any chance that the other rows stay blank?
    see attached file - now it is summing it in the first row and the others are showing the individual value..
    also .. in case the document is large and the portfolio numbers go down to 100s, is this formula still the best one?

    thanks a lot

    using it in a another file it does not work - is there possibly another way? or not?
    thanks
    Attached Files Attached Files
    Last edited by ln2012; 07-30-2013 at 01:19 PM.

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

    Re: vlookup and sumif - based on cell content

    you havent entered the formula correctly notice the $ signs you need then to anchor the cell reference
    =IF(COUNTIF($C$6:C6,C6)=1,SUMIF($C$6:$C$100,C6,$D$6:$D$100),"")

  5. #5
    Registered User
    Join Date
    12-09-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: vlookup and sumif - based on cell content

    thanks!!! - my bad

+ 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. copying cell content into a specific workbook based on the content in that cell
    By krishna reddy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2012, 03:52 AM
  2. VLOOKUP based on cell content
    By garyi in forum Excel General
    Replies: 17
    Last Post: 02-27-2012, 09:44 PM
  3. Change cell content based from another cell's content
    By RochesterColonial in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2010, 03:43 PM
  4. Replies: 2
    Last Post: 12-19-2006, 10:50 PM
  5. Replies: 2
    Last Post: 08-03-2006, 05:45 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