View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Moof Moof is offline
external usenet poster
 
Posts: 3
Default entering a formula

wow. that was easier. (and, yes - I don't know why I put the colons in my
question, since I never put them in my formulas).

"Stan Brown" wrote:

Thu, 19 Apr 2007 15:38:01 -0700 from Moof
:
i'm trying to create a spreadsheet with the following:

If C:3=NEW, THEN I:3=H:3+15 (I:3 AND H3 are in date format)
If C:3=RENEWAL, THEN I:3=D:3-35 (again, I:3 and D:3 are in date format)


What if C3 contains neither? Or are you guaranteed that C3 will
contain one or the other?

Would appreciate anyone's help!


Lose the colons, for one thing. :-)

In I3 you want this formula:

=if(C3="NEW", H3+15, if(C3="RENEWAL", D3-35, "oops -- bad case"))

If C3 always contains NEW or RENEWAL, you can simplify I3 to

=if(C3="NEW", H3+15, D3-35)

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/