# Formula to Find matching values in one column, and return totals for all rows that match

1. ## Formula to Find matching values in one column, and return totals for all rows that match

table1.jpg

I am looking for a formula that will satisfy the following:

1) find all the values in column "A" that match
2) In column "G", sum up all the values in "F" that go with the matching values in column "A"
3) For example, in rows 14-16, the values in column "A" match. Cell G16 sums up F14:F16

Thanks!

2. ## Re: Formula to Find matching values in one column, and return totals for all rows that mat

In G2, then copy down.

=IF(COUNTIF(A:A,A2)=COUNTIF(A\$2:A2,A2),SUMIF(A:A,A2,F:F),"")

3. ## Re: Formula to Find matching values in one column, and return totals for all rows that mat

table2.jpg

Haseeb A, thank you. This formula works mostly but on some cells (see cells in "red") the formula does not return a value.

4. ## Re: Formula to Find matching values in one column, and return totals for all rows that mat

Sorry for the late response,

My previous formula only sum values in last occurrence of an order#. If you are getting blank means that particular order# will be down some where, or you did not use correct absolute reference in 2nd COUNTIF A\$2:A2. Could you please attach a spreadsheet instead of screen shot?

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### 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