# Posts by Dogz

I have a bit of an issue that I could do with some help to solve :

I have a list of serveral Excel files within a directory (80+ files). I need to search all of these Excel files to see if they contain certain values. It would be painstakingly laborious to open each file individually and search.

I initially looked at using Windows Explorer to do this, but it only works if the values are formated as text. All values will be numerics Eg 12345678 or 87654321. What is the best way for me to attach this ? I assume that I will need to write a macro to open each file within the directory in turn and then to carry out the search. Any files containing the required values will be listed and stored.

Any ideas to make things simpler greatly appreciated.

Cheers

Dave

Re: NPV Calc

Thanks for that, but it doesn't show me exactly what I want.

Essentially I need to be able to feed values into the NPV calc. How many values go into thsi calc depends on the term. So, 12 months would have 12 values. 6 montsh would only have six values etc. This is why I wondered if I would have to use an array to do this ?

Am I explaining myself properly ????

Re: NPV Calc

Yes thats great - Thanks !!!

One further question though -

What about if I wanted use unequal payments.

Ie Total cashflow = 1000

Eg in month1 = (12/78)*1000
Month 2 = (11/78)*1000
Month3 = (10/78)*1000

Using Rule of 78. This could once again be between anything from 6months to 62 months.

Once again any help appreciated.

I am trying to create a function to calculate the NPV based on X periods of equal cashflow.

Obviously the NPV function works as = NPV(10%,cashflow1, cashflow2, cashflow3.........) etc.

I wish the function be like so : function NPV_D (Rate, total_cashflow, periods)

Each months cash flow would be total_cashflow/term so equal.

The problem come in that the equal cashflow could range from say 6 months to 62 months.

What is the best way to do this. Am I correct in assuming that I will need to use an array ?

Any help most appreciated - even to be pointed in the right direction woul be great.

Cheers

Dave