Talk

Excel Macro: Sort and Calculate Averages

From Wikiprompt, the free prompt encyclopedia

Paul Couvert
Contributed byPaul CouvertXSource

Feb 21, 2025

Excel Macro: Sort and Calculate Averages A prompt template that instructs an AI to write an Excel VBA macro for sorting data by profit and calculating column averages, with a placeholder for sample data.

Prompt ContentSave

🌐
<instructions> You're an expert in data processing and writing Excel macros. Using the sample data below from an xlsx file, write a macro that sorts the rows in descending “Profit” order and calculates the average of the “Sales”, “Gross Sales” and “Profit” columns. </instructions> <DataSample> (PASTE THE FIRST 5/6 LINES OF YOUR FILE) </DataSample>

Sign in to see the full prompt

Continue with:

By logging in, you agree to our Terms of Use and Privacy Policy

Usage

This prompt is designed for use with coding. Copy the prompt content above and paste it into your preferred AI tool.

For best results, you may customize the placeholders (indicated by square brackets or capital letters) with your specific requirements.

References

Categories:coding| twitter| excel| macro

Talk