Step-by-step tutorials and practical examples for machine learning in Excel with FormulaML. Learn through complete, real-world workflows.
Examples and Tutorials
Learn FormulaML through practical, step-by-step examples. Each tutorial provides a complete workflow you can follow in Excel.
Tutorial Categories
🎯 Beginner Tutorials
Perfect for getting started with machine learning in Excel.
Learn regression basics by predicting sales based on various factors.
- Dataset: Diabetes (adapted for sales context)
- Skills: Data loading, model training, evaluation
- Time: 15 minutes
Classic machine learning example for categorization.
- Dataset: Iris
- Skills: Multi-class classification, model comparison
- Time: 20 minutes
Group customers for targeted marketing campaigns.
- Dataset: Custom business data
- Skills: K-Means clustering, interpretation
- Time: 25 minutes
Compare multiple algorithms on the same problem.
- Skills: Systematic evaluation, selection criteria
- Time: 30 minutes
🚀 Advanced Workflows
Combine preprocessing, training, and evaluation in one workflow.
- Skills: Pipelines, automation, advanced preprocessing
- Time: 35 minutes
Optimize model performance with grid search.
- Skills: Grid search, cross-validation
- Premium Required
- Time: 40 minutes
Quick Start Examples
Example 1: Your First Prediction
# Load data
Cell A1: =ML.DATASETS.IRIS()
# Create and train model
Cell B1: =ML.CLASSIFICATION.SVM()
Cell B2: =ML.FIT(B1, features, target)
# Make prediction
Cell C1: =ML.PREDICT(B2, new_data)
Example 2: Simple Regression
# Load regression dataset
Cell A1: =ML.DATASETS.DIABETES()
# Separate features and target
Cell B1: =ML.DATA.SELECT_COLUMNS(A1, "0:9")
Cell C1: =ML.DATA.SELECT_COLUMNS(A1, 10)
# Train linear regression
Cell D1: =ML.REGRESSION.LINEAR()
Cell D2: =ML.FIT(D1, B1, C1)
# Check performance
Cell E1: =ML.EVAL.SCORE(D2, B1, C1)
Example 3: Data Exploration
# Convert Excel data
Cell A1: =ML.DATA.CONVERT_TO_DF(MyData!A:E, TRUE)
# Explore
Cell B1: =ML.DATA.INFO(A1)
Cell B2: =ML.DATA.DESCRIBE(A1)
Cell B3: =ML.DATA.SAMPLE(A1, 10)
Learning Paths
Path 1: Business Analyst
- Start with Linear Regression Tutorial
- Move to Customer Segmentation
- Learn Model Comparison
- Apply to your own data
Path 2: Data Explorer
- Begin with Data Exploration
- Try Classification Tutorial
- Explore Different Models
- Practice Evaluation Techniques
Path 3: Advanced User
- Master Pipelines
- Optimize with Hyperparameter Tuning
- Explore Advanced Features
- Build complex workflows
Example Templates
Regression Template
=ML.DATASETS.DIABETES() # A1: Load data
=ML.DATA.SELECT_COLUMNS(A1, "0:9") # B1: Features
=ML.DATA.SELECT_COLUMNS(A1, 10) # C1: Target
=ML.PREPROCESSING.TRAIN_TEST_SPLIT(B1,C1,0.2,42) # D1: Split
=ML.REGRESSION.LINEAR() # E1: Model
=ML.FIT(E1, INDEX(D1,1), INDEX(D1,3)) # F1: Train
=ML.EVAL.SCORE(F1, INDEX(D1,2), INDEX(D1,4)) # G1: Evaluate
Classification Template
=ML.DATASETS.IRIS() # A1: Load data
=ML.DATA.SELECT_COLUMNS(A1, {0,1,2,3}) # B1: Features
=ML.DATA.SELECT_COLUMNS(A1, 4) # C1: Target
=ML.PREPROCESSING.TRAIN_TEST_SPLIT(B1,C1,0.2,42) # D1: Split
=ML.CLASSIFICATION.SVM() # E1: Model
=ML.FIT(E1, INDEX(D1,1), INDEX(D1,3)) # F1: Train
=ML.EVAL.SCORE(F1, INDEX(D1,2), INDEX(D1,4)) # G1: Evaluate
Clustering Template
=ML.DATA.CONVERT_TO_DF(Data!A:D, TRUE) # A1: Load data
=ML.CLUSTERING.KMEANS(4) # B1: Model
=ML.FIT(B1, A1) # C1: Train
=ML.PREDICT(C1, A1) # D1: Clusters
=ML.DATA.SAMPLE(D1, -1) # E1: View all
Common Workflows
Workflow 1: Complete ML Pipeline
- Data Loading → Convert or load dataset
- Exploration → INFO, DESCRIBE, SAMPLE
- Preparation → Select columns, handle missing
- Splitting → Train/test split
- Model Creation → Choose algorithm
- Training → FIT with training data
- Prediction → PREDICT on test data
- Evaluation → SCORE for performance
Workflow 2: Model Selection
- Prepare Data → Same for all models
- Create Models → Multiple algorithms
- Train Each → Same training data
- Evaluate All → Same test data
- Compare Scores → Pick best performer
- Validate Choice → Cross-validation if premium
Workflow 3: Production Pipeline
- Historical Data → Your Excel data
- Create Pipeline → Preprocessing + Model
- Train Pipeline → On all historical data
- Save Model → Keep trained object
- New Data → Fresh Excel data
- Predict → Apply to new data
- Monitor → Track performance
Tips for Following Examples
Setting Up
- Create new worksheet for each example
- Label your cells clearly (e.g., “Training Data”)
- Use consistent cell references (A1 for data, B1 for models)
- Save frequently to preserve object handles
Best Practices
- Read entire tutorial first before starting
- Type formulas manually (don’t copy-paste) for learning
- Check intermediate results with SAMPLE
- Note the object handles returned
- Document your work with cell comments
Troubleshooting Examples
- #NAME? error: FormulaML not installed
- Object handle not found: Reference correct cell
- Dimension mismatch: Check data shapes match
- Premium required: Use free alternative or upgrade
Real-World Applications
Sales & Marketing
- Customer lifetime value prediction
- Churn prediction and prevention
- Market segmentation
- Sales forecasting
- Lead scoring
Finance
- Credit risk assessment
- Fraud detection
- Portfolio optimization
- Price prediction
- Demand forecasting
Operations
- Quality control
- Inventory optimization
- Maintenance prediction
- Resource allocation
- Process optimization
Human Resources
- Employee retention
- Performance prediction
- Recruitment screening
- Training needs analysis
- Compensation analysis
Contributing Examples
Have a great FormulaML example? We’d love to include it!
- Real-world business problems
- Creative uses of ML in Excel
- Industry-specific applications
- Novel workflows
Contact: examples@formulaml.com
Next Steps
Ready to start learning?
- Beginners: Start with Linear Regression Tutorial
- Intermediate: Try Customer Segmentation
- Advanced: Explore Pipeline Tutorial
- Apply: Use templates with your own data
Or browse:
Let’s build something amazing with machine learning in Excel!