View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Maistrye Maistrye is offline
external usenet poster
 
Posts: 1
Default Days by month and IF statement.


Daniel Q. Wrote:
If A1 = 6/1/2006, can B1 = the number of days in June w/o using a
VLOOKUP?

Im trying to embed a couple of conditions in an IF statement and i
don't
know where to begin.

I have a fixed volume of 500/day; July = 31 days; total 15500 for
july.

I need to charge .442 for the first 10000 per unit, 1.327 for the next
100
units, 1.098 forthe next 140, and .9255 for the remaining units, which
in
this case are 5260.

I made A1 = 500x31 (15500) and then have the formula point at it.

How can i make C1 read A1 and then give me the correct output for that
volume?

Thank you for all your help in advance.


Not sure if you meant B1 or C1, but try this:

=DATE(YEAR(A1)+IF(MONTH(A1)=12,1,0),IF(MONTH(A1)=1 2,1,MONTH(A1)+1),1)-A1

You'll have to switch the format to number, since it assumes you want
it to be a date format.

Scott


--
Maistrye
------------------------------------------------------------------------
Maistrye's Profile: http://www.excelforum.com/member.php...o&userid=36078
View this thread: http://www.excelforum.com/showthread...hreadid=563463