+ Reply to Thread
Results 1 to 6 of 6

Formula to search a string in a column and then multiply 2 columns

  1. #1
    Forum Contributor
    Join Date
    08-02-2007
    Location
    Panama & Austria
    MS-Off Ver
    2003 & 2010
    Posts
    186

    Formula to search a string in a column and then multiply 2 columns

    Hi,
    I need a formula that will check for a given string (Person's UserName) in a column (Range("A3:A203") and multiply the value in column "B" and "C" for each row where it finds the UserName.

    I've tried some Ctrl+Alt+ENTER formulas, VLookUp's, LookUps without success. Problem is the range with the names is NOT sorted !

    Any help is very appreciated.
    Thanks again.
    Last edited by Wizz; 06-10-2010 at 09:47 AM.

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

    Re: Formula to search a string in a column and then multiply 2 columns

    Do you perhaps mean

    =SUMPRODUCT(--(A3:A203=A1),B3:B203,C3:C203)

    where A1 holds username

    (modify delimiters to suit your locale)

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Formula to search a string in a column and then multiply 2 columns

    Hi, maybe

    =SUMPRODUCT(--($A$3:$A$203=A3),$B$3:$B$203,$C$3:$C$203)

    Regards


    Edit: sorry, I did not mean to overlap: same answer.

  4. #4
    Forum Contributor
    Join Date
    08-02-2007
    Location
    Panama & Austria
    MS-Off Ver
    2003 & 2010
    Posts
    186

    Re: Formula to search a string in a column and then multiply 2 columns

    Thanks Donkeyote; Grazie Canapone!
    It worked BEAUTIFUL !

    But what does the "--" means? I've already read the Help file 3 times and find no clue !!

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

    Re: Formula to search a string in a column and then multiply 2 columns

    For a good overview of SUMPRODUCT and coercion see the link in my sig. to Bob Philips' white paper.

    SUMPRODUCT has evolved beyond MS intentions hence the help file bears little relation to how the majority of us use it.

  6. #6
    Forum Contributor
    Join Date
    08-02-2007
    Location
    Panama & Austria
    MS-Off Ver
    2003 & 2010
    Posts
    186

    Re: Formula to search a string in a column and then multiply 2 columns

    WOW !
    Awesome link !

    Thanks again!

+ 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