For the 1st try: =COUNT(IF(MONTH($B$20:$B$507+0)=MONTH(D$6),1,"")) confirmed with CTRL+SHIFT+ENTER..
I don't see where the 2nd applies...?
For the 1st try: =COUNT(IF(MONTH($B$20:$B$507+0)=MONTH(D$6),1,"")) confirmed with CTRL+SHIFT+ENTER..
I don't see where the 2nd applies...?
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Or without an array
VBA Noob=SUMPRODUCT(--(TEXT($B$20:$B$507,"mm")=TEXT($D$5,"mm")))
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
I'm so sorry it sounds very confusing.
If you look at the spreadsheet, row D7 to D16 are the questions I need answered from the data entered below it.
I managed to get the countif function done to count how many clients were on for a month selceted from the drop down list in cell D5.
What I now need to do is add a similar function where I can change the logical test so that it counts text strings (which are selected from a drop down list within the spreadsheet) for cells D8, D10, D12, D15 & D16.
The trouble I have is that there are numerous text strings click on cell L20 for example. Also to add to the complications one of the drop down entires may need the data inputer to add extra text into cell M20......
AAAAAAAAGGGGGGGHHHHHHHH Its not going to work, I just know it......
{=COUNT(IF(B$20:B507=D$6,1,""))}
The above is my basic formula for the array yet where can I add another function within the above to count text strings etc....
What's your expected results ??
A total of Unquie items or list all 30 answer in one cell with a count ??
e.g for D9 would you have something like
VBA Noob="Males Tot "&COUNTIF(K:K,"male")&" / "&"Female Tot "&COUNTIF(K:K,"Female")
Looking at your data I would think about using Advance filter as will give you flexiblity. See link for more. Make sure to look at 2nd link for filtering criteria
http://www.contextures.com/xladvfilter01.html
VBA Noob
I think your right VBA Noob... I'm asking too much...
I never said that. I suggested a possible alternative.I'm asking too much
Also you never answered this questionWhat's your expected results ??
A total of Unquie items or list all 30 answer in one cell with a count ??
e.g for D9 would you have something like
Quote:
="Males Tot "&COUNTIF(K:K,"male")&" / "&"Female Tot "&COUNTIF(K:K,"Female")
VBA Noob
What I'd like to set up is a function like below whereby the first part 'COUNT(IF(B$20:B507=D$6,1,"")' will set the filter so that the only months selected from the drop down list will be counted. The second part of the function would then be used to count the different areas I need to get (cells C8-C16).Originally Posted by VBA Noob
For example to count all males within the selected month would work out as;
{=COUNT(IF(B$20:B507=D$6,1,"")*AND(SUM($K$20:$K$508="Male")))} - This does'nt work but used as an example.
(Thanks for your help by the way)....
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks