COUNTIF statement

Lukums

Board Regular
Joined
Nov 23, 2015
Messages
195
Hello,

Looking to do a COUNTIF statement I believe.

We are looking to find a particular salesperson in this instance Caitlin which is located in column B and then looking for STATE in column E if this is TRUE then total the values found in column H against all the lines found.

The formula will always be kept on Sheet "Total" in Cell "A4"

Example below:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Sales Person[/TD]
[TD]Quote Number[/TD]
[TD]Cust name[/TD]
[TD]State[/TD]
[TD]Post code[/TD]
[TD]Shed Size[/TD]
[TD]Quote Value[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Caitlin[/TD]
[TD][/TD]
[TD][/TD]
[TD]NSW[/TD]
[TD][/TD]
[TD][/TD]
[TD]$1000[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Caitlin[/TD]
[TD][/TD]
[TD][/TD]
[TD]QLD[/TD]
[TD][/TD]
[TD][/TD]
[TD]$9999[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Caitlin[/TD]
[TD][/TD]
[TD][/TD]
[TD]NSW[/TD]
[TD][/TD]
[TD][/TD]
[TD]$2000[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Caitlin[/TD]
[TD][/TD]
[TD][/TD]
[TD]NSW[/TD]
[TD][/TD]
[TD][/TD]
[TD]$3000[/TD]
[/TR]
</tbody>[/TABLE]

Probably an easy one for you guru's appreciate the help

Luke
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Something like this?


Excel 2016
ABCDEFGH
1DateSales PersonQuote NumberCust nameStatePost codeShed SizeQuote Value
21CaitlinNSW$1,000
31CaitlinQLD$9,999
41CaitlinNSW$2,000
51CaitlinNSW$3,000
Data




Excel 2016
AB
1Sales PersonCaitlin
2StateNSW
3
4Total6000
Total
Cell Formulas
RangeFormula
B4=SUMIFS(Data!H2:H10,Data!B2:B10,Data!L1,Data!E2:E10,Data!L2)
 
Upvote 0
Something like this?

Excel 2016
ABCDEFGH
Sales PersonQuote NumberCust nameStatePost codeShed Size
CaitlinNSW
CaitlinQLD
CaitlinNSW
CaitlinNSW

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]Date[/TD]

[TD="align: right"]Quote Value[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]$1,000 [/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]$9,999 [/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]$2,000 [/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]$3,000 [/TD]

</tbody>
Data




Excel 2016
AB
Sales PersonCaitlin
StateNSW
Total

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]6000[/TD]

</tbody>
Total

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B4[/TH]
[TD="align: left"]=SUMIFS(Data!H2:H10,Data!B2:B10,Data!L1,Data!E2:E10,Data!L2)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Thanks for helping! unfortunately returning a result with 0.
 
Upvote 0
Thanks for helping! unfortunately returning a result with 0.
Are the values in column H actual numbers, or text?
What happens if you put this in a blank cell on the data sheet? =ISNUMBER(H2)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top