Concept: Formula Writer and Explainer
The Worksheets Formula Writer generates a workbook formula based on your description of what you want the formula to do. You can insert the resulting formula into the workbook, or you can use the generated formula as a guide and make edits to it. You need edit access to the workbook to use the Formula Writer.
Generative AI and How Worksheets Uses It
Generative artificial intelligence (Gen AI) encompasses a range of AI systems that create many kinds of content. Worksheets uses a generative AI model when generating and explaining formulas so that you receive the most accurate results possible. Formula generation is more like an art than a science so you should test the results that you receive from the Formula Writer. You can insert the formula and run it, interpret the results, and then edit and resubmit the formula description if needed, to get the formula you want. You can also use the generated formula as a starting point or an idea generator for your own formula.
To get the best results from the Formula Writer:
- Include as much detail as possible in the formula description.
- Include structured references, table and column names, column/row/cell references, and so on.
- Use quotation marks around any strings (text).
Formula Explanations
You can have Worksheets explain to you how a formula works. To better understand formulas in your workbook, select a cell containing a formula, then right-click and select
Explain Formula
. Create a Formula Using the Formula Writer
The Formula Writer enables you to describe what you want to do in a Worksheets formula and then it generates a formula that you can insert into the workbook.
To use the Formula Writer, Worksheets must be enabled for GenAI features. Additional setup steps might be required depending on your organization's subscription service agreement, and the
Enable Worksheets GenAI Features
option must be enabled in the Workday Conversation Settings
section on the Edit Tenant Setup - System
task.- Click the cell where you want to insert the generated formula.You can’t place a generated formula into a Live Data area.
- Open the Formula Writer using one of these methods:
- Click theFormula Writersparkle icon
in the toolbar. - Navigate toView>Panels>Formula Writer.
- Right-click the cell and then selectFormula Writer.
- Type instructions for the formula you want into theFormula Descriptionfield.
- ClickGenerate. Worksheets generates a formula and displays it in theResultarea and an explanation of the formula displays below the results.If your formula description isn't detailed enough to generate a formula, a message displays asking you to change the description.
- Review the formula and edit it as needed.Generated formulas often don't include correct cell references and might have other issues. The process of generating formulas is iterative, and relies on you to assess the output and edit the formula as needed.
- ClickInsert into <Cell>to place the formula into the selected cell and automatically run it.
Example Formula Descriptions
This table shows examples of well-written formula descriptions, along with their resulting formulas:
Formula Description | Formula |
|---|---|
What is the average of column A, rounded to two decimal places. | ROUND(AVERAGE(A:A),2) |
Count how many cells have the text "Ready for Promotion" in column S. | COUNTIF(S:S,"Ready for Promotion") |
Calculate the sum of the product of values in cells A1:A5 and B1:B5. | SUMPRODUCT(A1:A5,B1:B5) |
In A1:A5 I have a list of names and in column B1:B5 I have a list of corresponding ages. What is the name of the person in D1 based on my list of names and ages? | INDEX(A1:A5, MATCH(D1, B1:B5, 0)) |
Give me a list of unique values from column A. | MS.UNIQUE(A:A) |
I have a list of fruit names in column A and their corresponding prices in column B. How do I calculate the price of an apple? | VLOOKUP("Apple",A:B,2,0) |
Divide A1 by A2. If there is an error, return 0. | IFERROR(A1/A2,0) |
What is the last day of the current month? | EOMONTH(TODAY(),0) |
Find the "Employee Name" of the employee with the lowest "Prior Bonus" in the dataset "CompDetails." | INDEX(CompDetails[Employee Name],MATCH(MIN(CompDetails[Prior Bonus]),CompDetails[Prior Bonus],0)) |
Find the "Employee Name" of the employee with the lowest "Salary Increase" among those hired after January 1, 2010, in the dataset "CompDetails." | INDEX(CompDetails[Employee Name],MATCH(MINIFS(CompDetails[Salary Increase],CompDetails[Hire Date],">1/1/2010"),CompDetails[Salary Increase],0)) |
Calculate the average of the "New Salary" column to find the average salary of all employees. | AVERAGE(CompDetails[New Salary]) |
Calculate the average of the "Proposed Bonus %" column to compute the average proposed bonus percentage for all employees. | AVERAGE(CompDetails[Proposed Bonus %]) |
Calculate the total sum of the "Prior Bonus" column to determine the total prior bonus for all employees. | SUM(CompDetails[Prior Bonus]) |
Find the total sum of the "Salary Increase" column to determine the total salary increase for all employees. | SUM(CompDetails[Salary Increase]) |
Identify the highest value in the "New Salary" column to find the highest new salary among all employees. | MAX(CompDetails[New Salary]) |
Return the list of "Employee Name" where the cost center is "41200 Payroll". | FILTER(CompDetails[Employee Name],CompDetails[Cost Center]="41200 Payroll") |
Find the "Employee Name" and "Supervisor" for employees with a "New Salary" greater than 100,000. | FILTER(CompDetails,CompDetails[New Salary]>100000) |
Determine the "Employee Name" and "Supervisor" for employees with a "Proposed Bonus %" greater than 0.02. | FILTER(CompDetails,CompDetails[Proposed Bonus %]>0.02,CompDetails[Employee Name],CompDetails[Supervisor]) |
Use Total Base Pay in cell C2 and Time Type in cell D2 to calculate the Hourly Rate. If the value in cell D2 is "Part time", the formula divides by 4. If the value in cell D2 is "Full time", the formula divides by 8. | C2/IF(D2="Part time",4,IF(D2="Full time",8)) |
Calculate the median price from column R for the values in column Q that are "Electronics". | MEDIAN(IF(Q:Q="Electronics",R:R)) |