Gemini AI Excel formulas are the heart of this video, which uses the assistant live to analyze a dataset, generate the calculations and suggest a layout for an Employee Working Hours and OPEX Analysis dashboard. It is useful for HR, finance and project teams who reconcile contracted hours with invoices, and for any Excel user curious about AI-assisted formula writing. The finished HR Metrics and Workforce Analysis Excel Dashboard keeps all the logic in Excel; Gemini simply gets you there faster.
The working hours and OPEX dashboard being built
- Total budget allocated and agreed working hours with employees
- Actual hours spent and the percentage of utilized time
- OPEX invoice hours paid and payment completion percentage
- Extra hours and extra payments, missing hours and missing payments
- Total employees, employees by gender (with percentage) and by nationality
- A doughnut chart of paid vs. unpaid salaries with the unpaid percentage highlighted
- A monthly expense summary showing the highest spending months
- A line chart comparing actual and invoiced hours
- Interactive slicers by department, plus filters by employee name
The dataset behind it
- Employee details: staff ID, name, position, nationality, gender, section and department.
- Rates and contracts: hourly rates and 200-hour rates in two sets for two periods, with start and end dates for each.
- Salary adjustments: 5% and 10% reduction columns for special cases.
- Monthly tracking: for each month from January to December, the invoice amount, actual amount worked and final amount paid.
- Hours and OPEX calculations: agreed hours, actual hours, actual hours amount, missing and extra hours and amounts, percentage difference, OPEX invoice hours paid and remaining budget balance.
You can download the working hours and expenses dataset and follow along.
How the Gemini AI Excel formulas are generated, step by step
- Analyze the dataset and extract calculations. Gemini reads the data and identifies which calculations the dashboard needs.
- Generate formulas for agreed hours, actual hours and the actual hours amount.
- Calculate missing hours with a Gemini-generated formula.
- Generate the remaining metrics in the same way.
- Ask Gemini for dashboard recommendations.
- Create a PivotTable sheet to centralize the data, then build PivotTables for budget and hours.
- Finalize the pivot logic and calculations, ready for the visual dashboard.
The PivotTable stage is pure Excel. Microsoft's guide to creating a PivotTable and our article on the PivotTable explained cover what happens after the AI has done its part.
Getting reliable results from AI-generated Excel formulas
The video shows AI working best as a formula partner, not a replacement for understanding the data. A few habits make the difference:
- Describe your columns precisely. Give the exact header names and what each contains, for example that agreed and actual hours are in separate columns.
- Ask for one metric at a time. A prompt for missing hours alone produces a cleaner formula than a request for ten metrics.
- Test every formula on a few rows where you already know the answer before filling it down.
- Ask for an explanation with the formula so you can maintain it later.
- Audit the result. Excel's trace tools help; see auditing formulas with trace precedents and dependents.
Who this is for
- HR and workforce managers comparing agreed and actual hours per employee.
- Finance and procurement teams reconciling OPEX invoices against hours worked and remaining budget.
- Project and contract managers handling staff on two contract periods with different rates.
- Excel beginners who find formula writing slow and want a guided way to learn it.
More practice files are waiting in our free Excel practice datasets.
Common mistakes when using AI for Excel formulas
AI assistants speed up formula writing, but they also make it easy to copy a formula you do not understand. These are the errors to watch for:
- Vague prompts. Asking for "a formula for hours" without naming the columns leads to generic answers with placeholder references that do not match your sheet.
- Wrong cell references. A suggested formula may point to column C when your agreed hours sit in column F. Always check every reference before pressing Enter.
- Relative vs absolute references. A rate or budget cell that should stay fixed needs a dollar sign, for example $B$2, or it will shift when the formula is filled down.
- Ignoring blanks and zeros. Employees with no hours in a month can cause divide-by-zero errors in percentage columns. Wrapping the formula in IFERROR keeps the dashboard clean.
- Mixing periods. This dataset has two contract periods with different rates, so a formula must use the rate that belongs to the right period.
Adapting the working hours dashboard to your own data
You do not need the same columns as the video to use the approach. Start by listing the questions your team asks, such as which employees are under their agreed hours or how much budget remains, and map each one to a column you already have.
Then give Gemini your exact headers and ask for one formula per question. Place the results in helper columns next to your data, so the PivotTable sheet can summarize them by department, month or employee. If your organization uses different adjustments than the 5% and 10% reductions in this dataset, rename those columns and ask for the matching formula.
Once the calculations are stable, build the PivotTables, add department slicers and keep the raw data on its own sheet. That separation lets you paste next month's figures and refresh without rewriting any AI-generated logic.
Frequently asked questions
Can Gemini AI write Excel formulas?
Yes. In the video Gemini generates formulas for agreed hours, actual hours, the actual hours amount, missing hours and the remaining metrics, which are then used in Excel.
Can Gemini build the whole dashboard for me?
Not on its own here. Gemini analyzes the data, writes formulas and recommends dashboard content; the PivotTables and dashboard are built in Excel.
What does missing hours mean in this dashboard?
It is the shortfall when actual hours fall below agreed hours. The dataset tracks missing hours and amounts as well as extra hours and amounts.
Can I filter the dashboard by department?
Yes. Interactive slicers filter the data by department, and the video also shows filters by employee name.
Get the template
Prefer the finished version? Get the working hours and OPEX Excel dashboard, and browse related templates in the HR dashboard collection or the full dashboard templates library.





Share:
macOS Style Excel Dashboard Widgets: Balance Card, Banner, Goal Bar
Figma Google Sheets Dashboard: Designing a Project Status Tracker