Page 1 of 1

## 3 Replies - 416 Views - Last Post: 11 November 2017 - 07:27 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=407512&amp;s=d95e887a327fff0a71efe5491b08abed&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 kyle01

Reputation: 1
• Posts: 202
• Joined: 26-November 14

Posted 10 November 2017 - 02:08 PM

I have a excel spreadsheet but I am having trouble with an IF statement. This is what the IF statement is meant to do (is pseado code): IF(B2:B12 equals C2:12 then in C15 add the totals in A2:A12).

So, if e.g. B2 says "yes" and when I type "yes" in C2, in C15 it will add the value in A2 to whatever the current amount is. Which I can then use the drag feature to apply the same principle to the rest of the rows below.

These are the formulas I've tried already but I keep getting the #VALUE! message in the cell. I'm terrible with Excel spreadsheets, this would be a breeze in java
```=IF(B2:B12=C2:C12,A2:A12,"")

```

I was thinking to do something like:, but that just throws a error window
```=IF(B2:B12=C2:C12,=SUM(A2:A12),"")

```

Is This A Good Question/Topic? 0

## Replies To: Excel Spreadsheet formula help

### #2 kyle01

Reputation: 1
• Posts: 202
• Joined: 26-November 14

## Re: Excel Spreadsheet formula help

Posted 10 November 2017 - 02:21 PM

Edit: I used this but the value is 0 for some reason

```=SUMIFS(A2:A12,B2:B12,”Yes”,C2:C12,”Yes”)

```

[url]https://ibb.co/ef5yqw[/url]

### #3 andrewsw

• RequestedRangeNotSatisfiable

Reputation: 6552
• Posts: 26,565
• Joined: 12-December 12

## Re: Excel Spreadsheet formula help

Posted 11 November 2017 - 12:13 AM

That SUMIFS formula is correct, apart from the unusual quote marks.
(Another reason it might not be working is if automatic calculation is switched off.)

### #4 kyle01

Reputation: 1
• Posts: 202
• Joined: 26-November 14

## Re: Excel Spreadsheet formula help

Posted 11 November 2017 - 07:27 AM

andrewsw, on 11 November 2017 - 07:13 AM, said:

That SUMIFS formula is correct, apart from the unusual quote marks.
(Another reason it might not be working is if automatic calculation is switched off.)

ok it worked, i restarted excel and for some reason it just worked