Not sure what formula to use

awrex

New Member
Joined
Jul 29, 2011
Messages
6
Hi..


I'd like to count column 1 if a cell in col2 or col3 contains data.

I was looking at vlookup & countif & countifs, however I keep getting errors or a 0 return when I know I shouldn't.

Thanks!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
awrex,
First welcome to the board. In the future, you need to tell us what version of Excel you are running and you need to be more specific about what you are doing.

It sounds like you need to use an "IF" statement.

=IF(COUNTIF(B:B,B1)>0,COUNT(A:A))

This assumes Column B (Column 2) contains a predetermined value in Cell B1, then it counts everything in Column A (Column 1).

I am guessing because your description did not go into detail. I hope this helps. You can always reply back with more information, or repost a new question.

Regards,

Charles
 
Upvote 0
Thanks and sorry!

Using Excel 2007..

I have three columns of data... I need to count column 1 and see how many matches I have with col 2 & col 3.

Department Session 1 Session2
------------------------------------------------------------------
Sales Tom
Marketing Bob Bob
Accounting Bob
Logistics Tom Tom


Basically I have to count who attended the sessions by department.

I hope this is enough.. thanks again!
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,908
Members
452,949
Latest member
beartooth91

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