+ Reply to Thread
Results 1 to 4 of 4

Slightly different names, and summing values

  1. #1
    Registered User
    Join Date
    02-11-2008
    Location
    Seattle, Wa
    Posts
    5

    Slightly different names, and summing values

    I am compiling a sales report.
    I have an spreadsheet that in Column A it has a list of customer names. A number of the customer names are only slightly different for example:
    Nielsen Entertainment
    AC Nielsen
    AC Nielsen - USA..
    and so forth. in columns to the left I have yearly sales figures.
    For this report they are all basically the same company, so I want to sum up all the sales for a particular year (say 2008).
    is there a simple way I can do this without having to go through and search for all the names?
    can i write a program/script that says:
    IF cell in column A has name=Nielsen, then take Value in Column G and sum and produce a single output of all sales done with that one company?
    and have it run that down the entire spreadsheet?
    Last edited by scootermclean; 03-12-2008 at 01:15 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    A formula like such will sum values in G based on if A has Nielson within the string.

    =Sumproduct(--Isnumber(Search("Nielson",$A$1:$A$1000)),$G$1:$G$1000)

    adjust ranges to suit.

    Note: "Nielson" can be replaced with a cell reference housing the string "Nielson"
    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
    Registered User
    Join Date
    02-11-2008
    Location
    Seattle, Wa
    Posts
    5
    Fantastic, that is amazing.
    Thank you very much.

    I want to learn as much about this as possible, I was wondering if you could briefly explain the formula.

    I think I understand it for the most part, sumproduct runs, is prompted to search for Nielsen in Column A, if true, then sum value in Column G.
    is a true returned as a 1? so the sumproduct just multiples value in G by 1?
    Also, what do the '--' mean prior to Isnumber?

    Thanks!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by scootermclean
    Fantastic, that is amazing.
    Thank you very much.

    I want to learn as much about this as possible, I was wondering if you could briefly explain the formula.

    I think I understand it for the most part, sumproduct runs, is prompted to search for Nielsen in Column A, if true, then sum value in Column G.
    is a true returned as a 1? so the sumproduct just multiples value in G by 1?
    Also, what do the '--' mean prior to Isnumber?

    Thanks!
    You pretty much got it...

    The Isnumber(Search()) argument in the Sumproduct formula returns arrays of Trues and Falses. The -- converts those to 1's and 0's so that the multiplication you described above can be performed.

    See here for more on this use of Sumproduct... a good read!

    http://www.xldynamic.com/source/xld.SUMPRODUCT.html

+ 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