I want to count cells those have text in a specific month (example January),
I have tried following but it doesn't work, please help.
=IF(B2(MONTH(1)),CONTA(B3:B11,D3:D11),"")
Thanks.
I want to count cells those have text in a specific month (example January),
I have tried following but it doesn't work, please help.
=IF(B2(MONTH(1)),CONTA(B3:B11,D3:D11),"")
Thanks.
You might need to attach a sample workbook. You have a syntax error in your formula;
Formula:Please Login or Register to view this content.
You have more than a syntax error.
This part is wrong...
=IF(B2(MONTH(1)),CONTA(B3:B11,D3:D11),"")
That should be something like...
=IF(B2=(MONTH(1)),CONTA(B3:B11,D3:D11),"")
however, any value in B2 will return 1, and any text in B2 will return error, so that test will always only ever give 1 or error
Do the cells contain actual text (Jan, Feb etc) or do they contain real dates?
Can you show some samples of what you have, and what you want?
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
@Ford
CONTA( ???
Last edited by sandy666; 02-09-2018 at 12:02 AM.
We need smiles, Ford
YesA we DoA
lol
Have you tried just COUNT?
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Attach the workbook.
Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
Yes, I already mentioned that...
So that wont work anyway.=IF(B2=(MONTH(1)),CONTA(B3:B11,D3:D11),"")
however, any value in B2 will return 1, and any text in B2 will return error, so that test will always only ever give 1 or error
Also, just because a cell is formatted to a date, still doesnt mean it contains an actual date - it could still just be text looking like a date.
Do a quick test...=isnumber(B2) if it returns FALSE, you have text
Lets see a sample workbook, then we can all stop guessing
Workbook attached herewith.
Last edited by AliGW; 02-09-2018 at 05:22 AM.
maybe
=SUM(ISNUMBER($B$2)*(MONTH($B$2)=1)*COUNTA($B$3:$B$7),ISNUMBER($D$2)*(MONTH($D$2)=1)*COUNTA($D$3:$D$7)) with CSE
I'm glad it works for you
If that takes care of your original question, & to say Thanks, please click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)
then select Thread Tools from the menu (top right corner of your thread) and mark this thread as SOLVED.
If you did it already - ignore it.
Thank you.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks