LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default CountIfs

Dear Gentlemen

I am trying to get the CountBetween function to work with CountIfs instead
of CountIf, but I am getting nowhere.

This is what I have:

Function CountBetween1(InRange, num1, num2, InRange1, num3) As Integer

With Application.WorksheetFunction
If num1 <= num2 Then
CountBetween1 = .CountIfs(InRange, "=" & num1) -
..CountIfs(InRange, "" & num2) And .CountIfs(InRange1, "=" & num3)
Else
CountBetween1 = .CountIfs(InRange, "=" & num2) -
..CountIfs(InRange, "" & num1) And .CountIfs(InRange1, "=" & num3)
End If
End With
End Function

Your help will be greatly appreciated.

Regards
farid2001
 
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
countifs Trev[_2_] Excel Worksheet Functions 23 October 12th 09 05:50 AM
countifs/or Caroline Excel Worksheet Functions 3 August 7th 09 02:25 AM
Countifs to Sumproduct for 2003 - was Simple Countifs.. from Fr Steve Excel Worksheet Functions 2 January 4th 09 05:36 PM
Countifs Diane Excel Worksheet Functions 1 November 21st 08 09:43 AM
Countifs Fx in 07 how in 03? HenderH Excel Discussion (Misc queries) 19 March 26th 08 12:37 PM


All times are GMT +1. The time now is 05:46 PM.

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

About Us

"It's about Microsoft Excel"