Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Formulas & Validation Rules Discussion
- :
- Need help with a Formula please!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Need help with a Formula please!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-02-2012 12:55 PM
I'm trying to create a field at the Opportunity Product level that divides the "Total Price" by the number of months in the contract (at the opp level). However, I only want it to calculate if the Product Name is not equal to "Cart".
IF(PricebookEntry.Product2.Name <> "Cart",TotalPrice/Opportunity.Months_in_Contract__
I keep getting an error that says I have an incorrect number of parameters for function IF(). Expected 3, received 2.
Any help would be very much appreciated!
Solved! Go to Solution.
Re: Need help with a Formula please!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-02-2012 01:58 PM
The Syntax is
IF(logical_test, value_if_true, value_if_false)
You are missing the else part i.e value_if_condition_is_false
Re: Need help with a Formula please!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-02-2012 02:39 PM
Thank you very much!

