Confused - Count in multiple fields

JBank19

New Member
Joined
Apr 27, 2018
Messages
4
I am current at a loss and in need of help. Below is the data I am trying to count from. I currently have the count function of: =COUNTIF(G1,"<> 0") in column H. This works if there is a balance in column G. I wanted to take it a step farther and basically if G is zero then if F is "114" count that. And I should get a count of 1 then in column H. I have spent a lot of time trying to figure this out. I feel like I'm very close, but still far away. Please help, I hope I was clear in describing the situation.:confused:

F G H I J
[TABLE="width: 447"]
<tbody>[TR]
[TD]PURP
CODE[/TD]
[TD] COMMERCIAL TOTALS[/TD]
[TD]COMMERCIAL COUNT[/TD]
[TD] RETAIL TOTALS[/TD]
[TD]RETAIL COUNT[/TD]
[/TR]
[TR]
[TD="align: right"]114[/TD]
[TD] $ -[/TD]
[TD][/TD]
[TD] $ -[/TD]
[TD="align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Thank you, but unfortunately when I make the formula =COUNTIFS(G1243,"<> 0",F1243,"=114") it returns a 0 instead of a 1. Any thoughts on how to fix this?
 
Upvote 0
Is the value in column F text or a number. Note the numeric value 114 is NOT the same as the text value "114".

If you are just checking one row of data, you don't need to use COUNTIF or COUNTIFS. Those are really for doing a whole range of rows at once.
Just use:
Code:
=IF(AND(F1243="114",G1243<>0),1,0)
if F1243 is text or
Code:
=IF(AND(F1243=114,G1243<>0),1,0)
if F1243 is numeric
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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