Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have the following function Function cohort(stap As Double) As Double cohort = Application.CountIf(Worksheets("deelnemers").Range ("D3:D992"), "<stap+5") - Application.CountIf(Worksheets("deelnemers").Range ("D3:D992"), "<stap") End Function The problem is that the function does not recognise "stap" in the function. If i replace stap with a number then the function works. but i need the number to be a variable.. some additional info on sheet "deelnemers" there is a list of people with ages in column D stap is the age of the people. So for example i want to know the number of people between 30(stap + 5) and 25(stap) I've been puzzling for ours but no result other then i know wher the function goes wrong. any adeas ? -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel lock / Notify feature malfunctioning | Excel Worksheet Functions | |||
Automatic value is malfunctioning | Excel Worksheet Functions | |||
How to use VBA variable in COUNTIF function? | Excel Worksheet Functions | |||
Sorting malfunctioning | New Users to Excel | |||
Fitter malfunctioning? | Charts and Charting in Excel |