PromptBase
Upgrade
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
Chat - (gpt-5.6)
Token size
344
Example input
[GOAL]: total sales for a given month and region [COLUMNS_OR_RANGES]: dates in A, region in B, amount in C, the month I want in E1, the region I want in E2 [TOOL]: Excel [CONDITIONS]: match the month of the date in A to E1 and the region in B to E2, then sum C [OUTPUT_PREFERENCE]: one formula I can paste in F1
Example output
1. FORMULA Paste this into F1: excel =SUMIFS($C:$C,$B:$B,$E$2,$A:$A,">="&DATE(YEAR($E$1),MONTH($E$1),1),$A:$A,"<"&EDATE(DATE(YEAR($E$1),MONTH($E$1),1),1)) 2. HOW IT WORKS This formula uses SUMIFS to add values in column C only when all conditions are met: SUMIFS($C:$C, ...) Sums the amounts in column C. $B:$B,$E$2 Only includes rows where the region in column B matches the region entered in E2. $A:$A,">="&DATE(YEAR($E$1),MONTH($E$1),1) Includes dates on or after the first day of the month specified in E1. $A:$A,"<"&EDATE(DATE(YEAR($E$1),MONTH($E$1),1),1) Includes dates before the first day of the following month. This captures the entire month regardless of whether dates include times. Using a date range like this is more reliable than comparing only the month number because it also distinguishes between different years. 3. SETUP Put the formula in F1. Ensure: Column A contains real Excel dates. Column B contains region names. Column C contains sales amounts. E1 contains any date within the month you want to total (for example, 15-Mar-2026 or 1-Mar-2026). E2 contains the region to match. If you want multiple results, copy the formula down. The references to E1 and E2 will adjust by row (for example, E2 → E3), while the data ranges remain fixed. 4. VERSION NOTES Excel (recommended): This formula works in Excel 2007 and later. Google Sheets: The same formula also works without changes. Important: E1 should contain a real date, not just text like "March". If E1 contains text instead of a date, you'll need a different approach. 5. ALTERNATIVE If your data is stored in an Excel Table (recommended for large datasets), use structured references instead. For example, if your table is named Sales: excel =SUMIFS(Sales[Amount],Sales[Region],$E$2,Sales[Date],">="&DATE(YEAR($E$1),MONTH($E$1),1),Sales[Date],"<"&EDATE(DATE(YEAR($E$1),MONTH($E$1),1),1)) This version automatically expands as new rows are added to the table and is easier to read and maintain.
🤖 GPT
Boosted itemBoosted

Excel And Google Sheets Formula Builder

Add to Cart
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
GPT-5.6
Tested icon
Guide icon
4 examples icon
Free credits icon
Stop fighting with spreadsheet formulas. Describe what you want in plain English and get the exact Excel or Google Sheets formula, an explanation of each part, and version notes. Handles lookups, conditional sums, text and date math, and errors. You give the goal, columns or ranges, tool, and conditions, and get a ready-to-paste formula plus a simpler or more robust alternative. Great for analysts, admins, and anyone who dreads VLOOKUP. Plain English to a working formula, fast.
...more
Added over 1 month ago
Report
Browse Marketplace