webdes03
10-13-2008, 05:26 PM
I'm having some trouble with something I'm trying to put together in Excel with VB. I know what I need to do, but I'm having a hard time getting my head around it.
I need to create a function that will look at an array and find an occurrence within the current month and output the value of one of the columns.
Column A contains dates, B contains a keyword and C contains a numerical value. I want to find the occurance of the keyword where the date is within the current month, and output the numerical value.
I've tried doing it with VLookup's but it didn't like that, or I didn't do it right, so I wanted to just make a VB function. The array will be fixed all the time say $A$1:$A$400, so the function could probably have just one input parameter (the keyword), and return the numerical value.
Any thoughts? I'm not really a VB pro so I'm not quite sure how to start...
I need to create a function that will look at an array and find an occurrence within the current month and output the value of one of the columns.
Column A contains dates, B contains a keyword and C contains a numerical value. I want to find the occurance of the keyword where the date is within the current month, and output the numerical value.
I've tried doing it with VLookup's but it didn't like that, or I didn't do it right, so I wanted to just make a VB function. The array will be fixed all the time say $A$1:$A$400, so the function could probably have just one input parameter (the keyword), and return the numerical value.
Any thoughts? I'm not really a VB pro so I'm not quite sure how to start...