8

I often find that the first thing I have to do when answering a question with the tag is to ask the user what their data looks like. I feel the best way to do this, is to prompt the user for sample data in the form of a Markdown table. This is clearer than verbose descriptions of the current structure of their data; and it is easier to simply copy and paste into Excel when attempting to provide a solution.

This is even more true for the expected output: "I want the data from column B to go into column F, but only if column D matches the criteria" vs. a Markdown table clearly showing the desired output.

I propose a prompt in the Ask Question wizard when asking a question with the tag:

  • Consider providing some sample data (not an image!) to show what your data looks like before the code, and what it should look like after the code; this makes it easier for people to copy. You can do this by following these steps:
    1. Copy some sample data from Excel
    2. Go to https://www.tablesgenerator.com/markdown_tables
    3. Paste the data (File -> Paste table data)
    4. Click Generate.
    5. Click Copy to clipboard
    6. Edit the Markdown table into the question.

I think these steps are easy enough to follow for newcomers to programming / Excel, and having such a clear representation of input and output often makes a world of a difference.

Admittedly, many Excel questions are not about "how do I get my data from this shape to that shape?", but many of them are.

Ideally, SE should implement this functionality without having to resort to a third-party site; but I imagine adding such a prompt would be simpler by an order of magnitude.

(A similar prompt for other data-related tags (e.g. ) might have value; but for SQL at least, the prompt should better refer the OP to sqlfiddle.com, providing potential answerers with an interactive environment. Excel (and perhaps LibreOffice Calc or other office suites) are different; there's no SQLFiddle equivalent.)

5
  • 4
    It's sad that such data needs to be asked for. I VTC such questions and move on:( Commented Mar 10, 2021 at 11:40
  • @MartinJames I'm not entirely sure that's the right response. After all, the OP may have described somewhere in the verbiage both exactly what the data looks like, and exactly what they need; and others may be able to parse the question and understand these things. For SQL questions, where you have SQLFiddle which makes it trivial for the OP to setup an interactive environment which answeres can use right away, not having that is a serious flaw in the question. But Excel-as-data questions have no such facility.
    – Zev Spitz
    Commented Mar 10, 2021 at 12:40
  • Looks like a good use case for a canonical "how to" answer you can link to in comments
    – charlietfl
    Commented Mar 10, 2021 at 13:10
  • @charlietfl Like this?
    – Zev Spitz
    Commented Mar 10, 2021 at 13:20
  • 1
    Agree! And it's especially useful to have sample data because MANY of the Excel tags actually deal with CSV files. But because Windows Excel is "Friendly" and wants to open CSV in Excel, people believe CSV files ARE Excel-files.
    – MyICQ
    Commented Mar 11, 2021 at 18:44

0

You must log in to answer this question.