View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dave F Dave F is offline
external usenet poster
 
Posts: 2,574
Default converting "May" to 31, "June" to 30, etc.

Agreed. However the person who will ultimately use this workbook has asked
that formulas be kept as simple as possible.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Bob Phillips" wrote:

Yeah but then you have to remember 30 days in Sep, 28 in Feb, except a leap
year. The formula handles it all.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Dave F" wrote in message
...
Wow that's a crazy formula.

I think the easier answer is just to have, for example, "May" appear as
5/31/2007. Then =DAYS(AN3) yields 31, etc.
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Bob Phillips" wrote:

=DAY(MIN(DATE(YEAR(DATEVALUE("01-"&AN3&"-"&YEAR(TODAY()))),MONTH(DATEVALUE("01-"&AN3&"-"&YEAR(TODAY())))+{2,1},DAY(DATEVALUE("01-"&AN3&"-"&YEAR(TODAY())))*{0,1}))-1)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Dave F" wrote in message
...
I'm using the following formula to calculate cost of funds:
=(SUM($E4:I4)-SUM($V4:$W4))*$AJ$2*(AN$3/360). $E4:I4 is capital,
$V4:$W4
is
depreciation, $A$J2 is the cost of funds rate, and AN$3 is the number
of
days
in the month. In this case, AN$3 = 31. But I want AN$3 to read "May".
How
would I modify the formula to convert "May" into 31, "June" into 30,
etc.

Algebraically, the math is: Cost of funds = [Net book value]*[COF
rate]*{[days in month]/360}

Thanks.

Dave


--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.