{"id":1923,"date":"2026-06-20T13:00:00","date_gmt":"2026-06-20T07:30:00","guid":{"rendered":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/"},"modified":"2026-11-15T11:38:40","modified_gmt":"2026-11-15T06:08:40","slug":"salesforce-advanced-formula-functions","status":"publish","type":"post","link":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/","title":{"rendered":"Advanced Formula Functions in Salesforce: ISCHANGED, PRIORVALUE, VLOOKUP, CASE"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Advanced Formula Functions let you write smarter formula fields and validation rules without code. For example, you can block a fee change after enrolment, or check a value against another table. Once you know a handful of these functions, many &#8220;we need a developer&#8221; requests turn into ten-minute admin fixes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This post builds on <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-formula-fields-field-types\/\">formula field basics<\/a> and <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-validation-rules-examples\/\">validation rules<\/a>. We will use the Course and Enrolment objects of Bright Path Tutors.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What are Advanced Formula Functions?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Advanced Formula Functions are the formula functions beyond simple maths and IF. They compare old and new values, convert picklists to text, map values and look up data in other records. Most of them work in formula fields, validation rules and flows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Think of basic functions as a calculator. Advanced Formula Functions are more like a spreadsheet expert who can also check history and look things up in another sheet.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Advanced Formula Functions Matter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Real business rules are rarely simple. A fee may only change before a course starts. A discount may depend on the student level. A code may need to exist in a master list. So you need more than plus and minus.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, interviewers love formula questions. They often ask you to write a validation rule on the spot. Knowing Advanced Formula Functions helps you answer with confidence.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Advanced Formula Functions Work<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Each of the Advanced Formula Functions returns one value, such as a number, text, date or TRUE and FALSE. In a validation rule, TRUE means &#8220;show an error&#8221;. In a formula field, the result is displayed on the record.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some Advanced Formula Functions only work in certain places. For example, ISCHANGED and PRIORVALUE only make sense when a record is saved, so they work in validation rules and flows, but not in formula fields.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-diagram-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-diagram-1-1024x640.png\" alt=\"Advanced Formula Functions diagram showing how a validation formula runs on save\" class=\"wp-image-1921\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-diagram-1-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-diagram-1-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-diagram-1-768x480.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">How Salesforce runs a validation rule that uses Advanced Formula Functions.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">ISCHANGED<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">ISCHANGED(field) returns TRUE when the field value changed in this save. Use it to block edits to key fields after a point.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PRIORVALUE<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PRIORVALUE(field) returns the value before the change. Use it to compare old and new values, such as &#8220;the fee went down&#8221;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">ISNEW<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">ISNEW() returns TRUE when the record is being created. Use it to apply a rule only on creation or only on updates.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CASE<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">CASE(field, value1, result1, value2, result2, else) maps values to results. It is often cleaner than many nested IF statements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">TEXT and ISPICKVAL<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Picklists are not plain text. So use TEXT(picklist) to turn a value into text, or ISPICKVAL(picklist, &#8220;Value&#8221;) to test it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">VLOOKUP<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">VLOOKUP(return field, lookup field, value) finds a record in a custom object and returns a field. It only works in validation rules.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">BLANKVALUE<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">BLANKVALUE(field, substitute) returns the substitute when the field is empty. It keeps formulas from failing on blanks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Advanced Formula Functions Cheat Sheet<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This table shows each function, where it works and a short example.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Function<\/th><th>Works in<\/th><th>Example use<\/th><\/tr><\/thead><tbody><tr><td>ISCHANGED<\/td><td>Validation rules, flows<\/td><td>Block fee change<\/td><\/tr><tr><td>PRIORVALUE<\/td><td>Validation rules, flows<\/td><td>Stop fee decrease<\/td><\/tr><tr><td>ISNEW<\/td><td>Validation rules, flows<\/td><td>Rule only on create<\/td><\/tr><tr><td>CASE<\/td><td>Formulas, rules, flows<\/td><td>Level to discount<\/td><\/tr><tr><td>TEXT<\/td><td>Formulas, rules, flows<\/td><td>Picklist to text<\/td><\/tr><tr><td>VLOOKUP<\/td><td>Validation rules only<\/td><td>Check code in master list<\/td><\/tr><tr><td>BLANKVALUE<\/td><td>Formulas, rules, flows<\/td><td>Default for empty field<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">CASE vs Nested IF<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Both Advanced Formula Functions patterns can map values, but they read very differently. This table compares them.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Feature<\/th><th>CASE<\/th><th>Nested IF<\/th><\/tr><\/thead><tbody><tr><td>Best for<\/td><td>One field, many values<\/td><td>Mixed conditions<\/td><\/tr><tr><td>Readability<\/td><td>High<\/td><td>Low when deep<\/td><\/tr><tr><td>Picklist support<\/td><td>Direct<\/td><td>Needs ISPICKVAL or TEXT<\/td><\/tr><tr><td>Length<\/td><td>Shorter<\/td><td>Longer<\/td><\/tr><tr><td>Ranges like greater than<\/td><td>Not supported<\/td><td>Supported<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-diagram-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-diagram-2-1024x640.png\" alt=\"Advanced Formula Functions comparison of CASE vs nested IF\" class=\"wp-image-1922\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-diagram-2-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-diagram-2-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-diagram-2-768x480.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">CASE vs nested IF, two common Advanced Formula Functions patterns.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In short, use CASE when you test one field against fixed values. Use IF when conditions mix fields or ranges.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A Real Advanced Formula Functions Example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Bright Path Tutors has three rules for its Course object. Fees cannot drop after the course is published. The discount depends on the level. Also, every Course Code must exist in an approved master list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Rule 1: Stop Fee Decreases After Publishing<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create a validation rule on Course called No_Fee_Drop_After_Publish. This formula blocks a lower fee when the status is Published.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AND(\n  NOT(ISNEW()),\n  ISPICKVAL(Status__c, \"Published\"),\n  ISCHANGED(Fee__c),\n  Fee__c &lt; PRIORVALUE(Fee__c)\n)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">NOT(ISNEW()) skips brand-new records. ISPICKVAL checks the status. ISCHANGED and PRIORVALUE together catch only a lower fee. If all four are TRUE, the user sees the error &#8220;Fee cannot be reduced after publishing.&#8221;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Rule 2: Discount by Level with CASE<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create a Percent formula field called Level_Discount. It returns a discount based on the Level picklist.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CASE(Level__c,\n  \"Beginner\", 0.10,\n  \"Intermediate\", 0.05,\n  \"Advanced\", 0,\n  0\n)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">CASE reads the picklist directly. The last 0 is the default for any other value, so the formula never fails.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Rule 3: Check the Code with VLOOKUP<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Bright Path keeps a custom object Approved_Code__c, where the Name field holds each approved code. This validation rule blocks codes that are not in the list.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Course_Code__c &lt;&gt; VLOOKUP(\n  $ObjectType.Approved_Code__c.Fields.Name,\n  $ObjectType.Approved_Code__c.Fields.Name,\n  Course_Code__c\n)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">VLOOKUP searches the Name field of Approved_Code__c for the course code. If no match is found, the values differ, so the rule shows an error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These are the test cases we ran.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Test<\/th><th>Expected result<\/th><\/tr><\/thead><tbody><tr><td>Lower fee on a Published course<\/td><td>Error shown<\/td><\/tr><tr><td>Raise fee on a Published course<\/td><td>Saved<\/td><\/tr><tr><td>New course with Beginner level<\/td><td>Discount 10%<\/td><\/tr><tr><td>Course Code PY101 in master list<\/td><td>Saved<\/td><\/tr><tr><td>Course Code XX999 not in list<\/td><td>Error shown<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes with Advanced Formula Functions<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Using ISCHANGED in a formula field, where it is not allowed.<\/li>\n\n<li>Comparing a picklist with = instead of ISPICKVAL or TEXT.<\/li>\n\n<li>Forgetting a default value in CASE, which returns blank.<\/li>\n\n<li>Not handling blanks, so a formula fails on empty fields.<\/li>\n\n<li>Writing one giant formula instead of splitting logic into helper fields.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for Advanced Formula Functions<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add comments with \/* *\/ to explain long formulas.<\/li>\n\n<li>Use BLANKVALUE so empty fields do not break results.<\/li>\n\n<li>Prefer CASE over deep IF chains when testing one field.<\/li>\n\n<li>Test every rule with positive and negative cases before release.<\/li>\n\n<li>Keep error messages clear and tell users how to fix the problem.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Practice Task<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Write a validation rule that stops anyone from changing Start Date once the course status is Completed. Hint: combine ISPICKVAL and ISCHANGED inside AND.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Most Asked Advanced Formula Functions Interview Questions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">These Advanced Formula Functions questions are some of the most common technical questions for admins.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Basic Advanced Formula Functions Interview Questions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q1: What does ISCHANGED do?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It returns TRUE if a field value changed in the current save. It is used in validation rules and flows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q2: What does PRIORVALUE do?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It returns the field value before the current change. Use it to compare old and new values.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q3: What does ISNEW do?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It returns TRUE when the record is being created. It helps apply rules only to new or only to existing records.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q4: How do you check a picklist value in a formula?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use ISPICKVAL(field, &#8220;Value&#8221;) or convert it with TEXT(field). A plain = comparison does not work on picklists.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q5: What does the CASE function do?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It compares one field with a list of values and returns the matching result. The last argument is the default.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q6: What does BLANKVALUE do?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It returns a substitute value when a field is blank. Otherwise it returns the field value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q7: What is the difference between ISBLANK and ISNULL?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ISBLANK works for text and other types and is recommended. ISNULL does not treat empty text as null, so it is older and less reliable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q8: What does TEXT do?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It converts a value like a picklist, number or date into text. You need it to join a picklist with other text.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Intermediate Advanced Formula Functions Interview Questions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q9: Can you use ISCHANGED in a formula field?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No. It only works where a save happens, such as validation rules, flows and process logic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q10: What is VLOOKUP in Salesforce formulas?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It looks up a value in a custom object by matching a field, usually Name. It only works in validation rules.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q11: Write a rule to stop the Amount from decreasing.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use AND(ISCHANGED(Amount), Amount &lt; PRIORVALUE(Amount)). It returns TRUE only when the amount goes down.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q12: When should you use CASE instead of IF?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use CASE when you test one field against fixed values. Use IF when you need ranges or several fields.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q13: Can CASE handle a range like Amount greater than 1000?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Not directly, because CASE matches exact values. Use IF for ranges.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q14: How do you skip a validation rule for one user or profile?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add a check like $Profile.Name &lt;&gt; &#8220;System Administrator&#8221;. A better way is a custom permission checked with $Permission.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q15: What is the character limit of a formula?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A formula can have up to 3,900 characters, and the compiled size has its own limit. Splitting logic into helper fields keeps you under the limits.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q16: How do you handle a blank number in a calculation?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use BLANKVALUE(field, 0) or the &#8220;Treat blank fields as zeroes&#8221; option on the formula field.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Advanced Advanced Formula Functions Interview Questions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q17: Scenario: users must not change Stage back from Closed Won. Write the rule.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use AND(ISCHANGED(StageName), ISPICKVAL(PRIORVALUE(StageName), &#8220;Closed Won&#8221;)). It fires whenever a Closed Won deal changes stage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q18: Why is VLOOKUP limited, and what can you use instead?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It works only on custom objects and only in validation rules. For more flexible lookups, use a record-triggered flow with Get Records.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q19: How do you make a formula easier to maintain?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Split logic into helper formula fields, add comments, use CASE and use custom metadata or custom permissions instead of hard-coded values.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q20: Scenario: a rule must apply only when a record is edited by users, not by an integration. How?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add a custom permission to the integration user and check NOT($Permission.Bypass_Rules) in the rule.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q21: Can PRIORVALUE be used on a new record?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On a new record there is no prior value, so it returns the current value or blank. That is why rules often add NOT(ISNEW()).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q22: How would you test complex formula rules?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">List positive and negative cases, test each in a sandbox and record the results. Also include blank and boundary values.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q23: What is the compile size limit, and how do you fix an error about it?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Formulas have a compiled size limit, which nested fields can exceed. Reduce references to other formula fields or move logic to a flow.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q24: Which Advanced Formula Functions help with dates?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">TODAY, NOW, ADDMONTHS, DATEVALUE and WEEKDAY are common. For example, ADDMONTHS(Start_Date__c, 3) returns a date three months later.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q25: How do you join text and a picklist in one formula?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the &amp; operator with TEXT, like Name &amp; &#8221; &#8211; &#8221; &amp; TEXT(Level__c). Without TEXT, the formula shows an error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q26: Can Advanced Formula Functions be used in flows?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. Flow formula resources support most functions, including ISCHANGED and PRIORVALUE in record-triggered flows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/help.salesforce.com\/s\/articleView?id=sf.customize_functions.htm&amp;type=5\" target=\"_blank\" rel=\"noopener noreferrer\">Salesforce Help: Formula Operators and Functions<\/a><\/li>\n\n<li><a href=\"https:\/\/trailhead.salesforce.com\/content\/learn\/modules\/advanced_formulas\" target=\"_blank\" rel=\"noopener noreferrer\">Trailhead: Advanced Formulas<\/a><\/li>\n\n<li><a href=\"https:\/\/help.salesforce.com\/s\/articleView?id=sf.validation_rules_examples.htm&amp;type=5\" target=\"_blank\" rel=\"noopener noreferrer\">Salesforce Help: Examples of Validation Rules<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Recap<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Advanced Formula Functions go beyond basic maths and IF.<\/li>\n\n<li>ISCHANGED, PRIORVALUE and ISNEW work in validation rules and flows.<\/li>\n\n<li>CASE maps one field to many values more cleanly than nested IF.<\/li>\n\n<li>Use TEXT or ISPICKVAL with picklists, and BLANKVALUE for empty fields.<\/li>\n\n<li>VLOOKUP checks values in a custom object, only in validation rules.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s Next?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Next, we control what outsiders see with the <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-external-sharing-model\/\">External Sharing Model<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Advanced Formula Functions let you write smarter formula fields and validation rules without code. For example, you can block a fee change after enrolment,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1920,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_swapz_level":"","_swapz_series_part":0,"_swapz_hide_toc":false,"_swapz_hide_featured":false,"_swapz_description":"","footnotes":""},"categories":[232,8,13],"tags":[74,26,62],"swapz_series":[],"class_list":["post-1923","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-objects-fields-ui","category-salesforce","category-salesforce-admin","tag-formulas","tag-intermediate","tag-service-cloud"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Advanced Formula Functions in Salesforce<\/title>\n<meta name=\"description\" content=\"Learn Advanced Formula Functions in Salesforce like ISCHANGED, PRIORVALUE, VLOOKUP, CASE and TEXT with real examples and top interview questions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Advanced Formula Functions in Salesforce\" \/>\n<meta property=\"og:description\" content=\"Learn Advanced Formula Functions in Salesforce like ISCHANGED, PRIORVALUE, VLOOKUP, CASE and TEXT with real examples and top interview questions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"Swapnil Zambare - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-20T07:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-15T06:08:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-featured.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Swapnil Zambare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Swapnil Zambare\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-advanced-formula-functions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-advanced-formula-functions\\\/\"},\"author\":{\"name\":\"Swapnil Zambare\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/10b09224c8bcc562716e86789427592a\"},\"headline\":\"Advanced Formula Functions in Salesforce: ISCHANGED, PRIORVALUE, VLOOKUP, CASE\",\"datePublished\":\"2026-06-20T07:30:00+00:00\",\"dateModified\":\"2026-11-15T06:08:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-advanced-formula-functions\\\/\"},\"wordCount\":1902,\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-advanced-formula-functions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-advanced-formula-functions-featured.png\",\"keywords\":[\"Formulas\",\"Intermediate\",\"Service Cloud\"],\"articleSection\":[\"Objects, Fields and UI\",\"Salesforce\",\"Salesforce Admin\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-advanced-formula-functions\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-advanced-formula-functions\\\/\",\"name\":\"Advanced Formula Functions in Salesforce\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-advanced-formula-functions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-advanced-formula-functions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-advanced-formula-functions-featured.png\",\"datePublished\":\"2026-06-20T07:30:00+00:00\",\"dateModified\":\"2026-11-15T06:08:40+00:00\",\"description\":\"Learn Advanced Formula Functions in Salesforce like ISCHANGED, PRIORVALUE, VLOOKUP, CASE and TEXT with real examples and top interview questions.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-advanced-formula-functions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-advanced-formula-functions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-advanced-formula-functions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-advanced-formula-functions-featured.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-advanced-formula-functions-featured.png\",\"width\":2400,\"height\":1260,\"caption\":\"Advanced Formula Functions featured image: formula editor card\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-advanced-formula-functions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Advanced Formula Functions in Salesforce: ISCHANGED, PRIORVALUE, VLOOKUP, CASE\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"name\":\"Swapnil Zambare - Blog\",\"description\":\"Salesforce &amp; Tech Guides\",\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\",\"name\":\"Swapnil Zambare - Blog\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"width\":512,\"height\":512,\"caption\":\"Swapnil Zambare - Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/theSwapnilZambare\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/10b09224c8bcc562716e86789427592a\",\"name\":\"Swapnil Zambare\",\"sameAs\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\"],\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/author\\\/swapnil-zambare\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Advanced Formula Functions in Salesforce","description":"Learn Advanced Formula Functions in Salesforce like ISCHANGED, PRIORVALUE, VLOOKUP, CASE and TEXT with real examples and top interview questions.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/","og_locale":"en_US","og_type":"article","og_title":"Advanced Formula Functions in Salesforce","og_description":"Learn Advanced Formula Functions in Salesforce like ISCHANGED, PRIORVALUE, VLOOKUP, CASE and TEXT with real examples and top interview questions.","og_url":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/","og_site_name":"Swapnil Zambare - Blog","article_published_time":"2026-06-20T07:30:00+00:00","article_modified_time":"2026-11-15T06:08:40+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-featured.png","type":"image\/png"}],"author":"Swapnil Zambare","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Swapnil Zambare","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/#article","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/"},"author":{"name":"Swapnil Zambare","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/10b09224c8bcc562716e86789427592a"},"headline":"Advanced Formula Functions in Salesforce: ISCHANGED, PRIORVALUE, VLOOKUP, CASE","datePublished":"2026-06-20T07:30:00+00:00","dateModified":"2026-11-15T06:08:40+00:00","mainEntityOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/"},"wordCount":1902,"publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-featured.png","keywords":["Formulas","Intermediate","Service Cloud"],"articleSection":["Objects, Fields and UI","Salesforce","Salesforce Admin"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/","url":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/","name":"Advanced Formula Functions in Salesforce","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/#primaryimage"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-featured.png","datePublished":"2026-06-20T07:30:00+00:00","dateModified":"2026-11-15T06:08:40+00:00","description":"Learn Advanced Formula Functions in Salesforce like ISCHANGED, PRIORVALUE, VLOOKUP, CASE and TEXT with real examples and top interview questions.","breadcrumb":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/#primaryimage","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-featured.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-advanced-formula-functions-featured.png","width":2400,"height":1260,"caption":"Advanced Formula Functions featured image: formula editor card"},{"@type":"BreadcrumbList","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-advanced-formula-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/swapnilzambare.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Advanced Formula Functions in Salesforce: ISCHANGED, PRIORVALUE, VLOOKUP, CASE"}]},{"@type":"WebSite","@id":"https:\/\/swapnilzambare.com\/blog\/#website","url":"https:\/\/swapnilzambare.com\/blog\/","name":"Swapnil Zambare - Blog","description":"Salesforce &amp; Tech Guides","publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/swapnilzambare.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/swapnilzambare.com\/blog\/#organization","name":"Swapnil Zambare - Blog","url":"https:\/\/swapnilzambare.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","width":512,"height":512,"caption":"Swapnil Zambare - Blog"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/in\/theSwapnilZambare"]},{"@type":"Person","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/10b09224c8bcc562716e86789427592a","name":"Swapnil Zambare","sameAs":["https:\/\/swapnilzambare.com\/blog"],"url":"https:\/\/swapnilzambare.com\/blog\/author\/swapnil-zambare\/"}]}},"_links":{"self":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/comments?post=1923"}],"version-history":[{"count":1,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1923\/revisions"}],"predecessor-version":[{"id":2155,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1923\/revisions\/2155"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media\/1920"}],"wp:attachment":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media?parent=1923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/categories?post=1923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/tags?post=1923"},{"taxonomy":"swapz_series","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/swapz_series?post=1923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}