# Countif or sumproduct

1. ## Countif or sumproduct

Hi guys
I think this is an easy one for you. I cannot get there...
I have 2 columns to sum only in those lines they're diferent values.
I did a comparation between 2 columns, and i want the sum of column G if the value is different on column H.
I've attach a file
Hope you understand that would be a great help for me.
Pedro

2. ## Re: Countif or sumproduct

Try in F12:

=SUMPRODUCT((F5:F10<>G5:G10)*F5:F10)

G12:

=SUMPRODUCT((F5:F10<>G5:G10)*G5:G10)

3. ## Re: Countif or sumproduct

Try these two array formulas

for column F

Formula:
`Please Login or Register  to view this content.`

For G

Formula:
`Please Login or Register  to view this content.`

***Array formula must be entered by using key combination of CTRL+SHIFT+ENTER and not just ENTER

4. ## Re: Countif or sumproduct

Try

=SUMPRODUCT(--(\$G5:\$G10<>\$H5:\$H10),G5:G10)

5. ## Re: Countif or sumproduct

I'd go with:
Formula:
`Please Login or Register  to view this content.`

Edit: missed the second one:

Formula:
`Please Login or Register  to view this content.`

Regards, TMS

6. ## Re: Countif or sumproduct

Guys
Many thanks for all your help
Best regards
Pedro

7. ## Re: Countif or sumproduct

You're welcome.

8. ## Re: Countif or sumproduct

Ditto. You're welcome.

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