Skip to content

Instantly share code, notes, and snippets.

@tejashah88
Last active February 25, 2025 00:22
Show Gist options
  • Save tejashah88/cdb753b58b890111c71d2a92e190577b to your computer and use it in GitHub Desktop.
Save tejashah88/cdb753b58b890111c71d2a92e190577b to your computer and use it in GitHub Desktop.
A prompt for ChatGPT-4o (or any multi-modal) model to convert any uploaded images into Excel formulas for copying.

Image to Excel Formula Prompt

A prompt for ChatGPT-4o (or any multi-modal) model to convert any uploaded images into Excel formulas for copying. I've been using this for my MECH-340W (Mechanical Engineering Design) class in CSU Chico, where we had a lot of tabular calculations with long involved in our design projects.

image

Usage

  1. Go to the ChatGPT website and log into your account. This will allow you to upload images.
    • The free plan for your account allows a limited amount of interactions with the 4o model. If you get the "unable to upload image" error at some point, it means you'll have to wait for a few hours before you can use that model again.
    • The plus plan allows unlimited uploads of images with the 4o model, but you can also create multiple accounts for a few more equations to process.
  2. Upload your image containing the equation. Make sure that only 1 equation is present and the handwritting is clear.
  3. Copy the prompt below and change the constants and variables names and Excel cell locations. Constants are treated as absolute references (e.g $A$3) and variables are treated as relative references (e.g. B4) if being used for creating charts.

Prompt

I need you to create an Excel formula based on the equation on the image.

List of constants and respective Excel cell locations:
A = Cell A1
B = Cell A2
C = Cell A3

List of variables and respective Excel cell locations:
X = Cell B1

Requirements to follow:
- Make the specified constants as absolute references.
- Make the specified variables as relative references.
- Do not include spaces in the formula.

Debugging

If the Excel formula doesn't match with the image, you can either ask ChatGPT to modify the equation or change the equation manually. For debugging purposes, you can ask the model to generate the math representation from the generated Excel formula. Make sure to copy-paste the defined constants and variables from above.

Generate the math representation of the following Excel formula. Substitute the cell locations with the relevant constants and variables below.

Excel Formula:
[PASTE EXCEL FORMULA HERE]

List of constants and respective Excel cell locations:
A = Cell A1
B = Cell A2
C = Cell A3

List of variables and respective Excel cell locations:
X = Cell B1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment