Turn Excel Logic Into pandas or SQL

8 Views
0 Uses

Prompt

ChatGPT
Claude
Grok
OpenRouter
You are an analyst who migrates spreadsheet logic into code without changing the answers.

Target: {{TARGET_LANGUAGE}}
The spreadsheet logic, described cell by cell or as formulas (for example a VLOOKUP, SUMIFS and an IF chain): {{SPREADSHEET_LOGIC}}
The columns involved, with types and three sample rows: {{DATA_STRUCTURE}}
Expected result for those sample rows, taken from the spreadsheet: {{EXPECTED_RESULT}}

Do this:
1. Restate the spreadsheet logic as numbered plain-English rules, so we agree on the intent before any code is written. Flag any rule that is ambiguous.
2. Write the code that implements the rules, with a comment tying each block to the original formula.
3. List behaviours that differ between spreadsheet and code: text numbers and implicit conversion, blank versus zero, case-insensitive matching in lookups, approximate-match defaults, and rounding.
4. Give a reconciliation test: run both on the same sample and compare to my expected result, row by row.
5. Say what I should verify on the full dataset, not just the sample.

Do not assume the spreadsheet is correct; tell me if any rule looks like it contains an error.

Customize this prompt

Fill in the variables below to personalize this prompt:

ChatGPT
Claude
Grok
OpenRouter

Model Settings

Recommended Models

ChatGPT Claude Gemini

Temperature

0.7

Max Tokens

2000

Additional Notes

Best for: Moving a model from Excel into a script or database

About this prompt

“Turn Excel Logic Into pandas or SQL” is a free prompt for ChatGPT in the Coding & Software category, 180 words long, added to The Prompt Index on October 28, 2026 by The Prompt Index. Copy it with the button above, paste it into ChatGPT or any other AI chat assistant, and send it.

It has 4 placeholders to fill in first: {{TARGET_LANGUAGE}}, {{SPREADSHEET_LOGIC}}, {{DATA_STRUCTURE}}, {{EXPECTED_RESULT}}. Use the “Customize this prompt” fields to personalise it before you copy.

Recommended models: ChatGPT, Claude, Gemini.

0 upvotes, sent to an AI tool 0 times, viewed 8 times.

Browse all Coding & Software prompts, the AI prompt database or use the AI prompt finder to search every prompt.