![]() |
Excel VBA Question
Ok, I am stuck trying to write a function to do the following, and it would be greatly appreciated if someone could help me. I have two columns, one of data, and another of dates. I need to write a function that filters by dates, and counts the total number of items For Example: My data (column 1) has Members, Non_Members, and Other. My Dates (Column 2) have, well, dates. I have a report sheet that I need to report the numbers. So in the report for each data type (Member, Non_Member, Other) I want to be able to use function (=blah(date I am filtering for less than or equal to)) and have it be able to count Column 1 and put how many returned in column 3 for that date range. Please, this is huge for me and will save days of work. Thanks, Brian __________________________________________________ ______________ Sorry, I think I posted this to the wrong forum. I have moved it to the Programming forum. -- thebside ------------------------------------------------------------------------ thebside's Profile: http://www.excelforum.com/member.php...o&userid=22736 View this thread: http://www.excelforum.com/showthread...hreadid=387506 |
If I understand correctly:
=sumproduct(--(a1:a1000="members"),--(b1:b1000<=date(2005,7,15)) Adjust the range, but don't use the whole column. thebside wrote: Ok, I am stuck trying to write a function to do the following, and it would be greatly appreciated if someone could help me. I have two columns, one of data, and another of dates. I need to write a function that filters by dates, and counts the total number of items For Example: My data (column 1) has Members, Non_Members, and Other. My Dates (Column 2) have, well, dates. I have a report sheet that I need to report the numbers. So in the report for each data type (Member, Non_Member, Other) I want to be able to use function (=blah(date I am filtering for less than or equal to)) and have it be able to count Column 1 and put how many returned in column 3 for that date range. Please, this is huge for me and will save days of work. Thanks, Brian __________________________________________________ ______________ Sorry, I think I posted this to the wrong forum. I have moved it to the Programming forum. -- thebside ------------------------------------------------------------------------ thebside's Profile: http://www.excelforum.com/member.php...o&userid=22736 View this thread: http://www.excelforum.com/showthread...hreadid=387506 -- Dave Peterson |
All times are GMT +1. The time now is 05:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com