Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Counting 2 Separate Columns With Unique Data

I WONDER IF THIS COULD BE DONE IN VBA

I wish to count how many people we pay as full time, part time or
temporary staff. This requires the formula to look in one column for
where type is FT and in another column for where salary is 0. When
these conditions are met, it should count how many cells in the salary
row have a salary figure and that will be our headcount for that
period.

A sample data is below:

A Staff name BType C Salary
Ken FT 3500
Toni FT 3500
Del PT 2980
Dave FT 0

The above should return 2 for full time headcount because Dave is no
longer with the company.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Counting 2 Separate Columns With Unique Data

=Sumproduct(($B$1:$B$500="FT")*($C$1:$C$5000))

will give you the count.

--
Regards,
Tom Ogilvy

"JAYDE" wrote in message
...
I WONDER IF THIS COULD BE DONE IN VBA

I wish to count how many people we pay as full time, part time or
temporary staff. This requires the formula to look in one column for
where type is FT and in another column for where salary is 0. When
these conditions are met, it should count how many cells in the salary
row have a salary figure and that will be our headcount for that
period.

A sample data is below:

A Staff name BType C Salary
Ken FT 3500
Toni FT 3500
Del PT 2980
Dave FT 0

The above should return 2 for full time headcount because Dave is no
longer with the company.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting with multiple criteria in separate Columns Felicia Excel Discussion (Misc queries) 4 July 13th 09 09:27 PM
Counting Unique Values That Are Separate by Commas in a Column Rothman Excel Discussion (Misc queries) 2 March 25th 08 08:06 PM
Counting unique combinations in two columns [email protected] Excel Discussion (Misc queries) 3 May 6th 07 03:03 AM
Counting based on values in two separate columns Wayne Excel Worksheet Functions 3 August 30th 06 07:43 PM
Counting values for variables in separate columns MMcQ Excel Discussion (Misc queries) 6 August 30th 06 12:28 PM


All times are GMT +1. The time now is 11:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"