Below you will find several results of working with ChatGPT. I am not a programmer, however – and this is very important, I understand the phenomena related to programming, object orientation, procedures, variables, etc. I also know, on a very basic level, VBA. In my daily professional life, as I independently run quite a large company, I need several tools that will allow me to have better control over operations such as invoice entry, transaction realization, and checking settlements with both suppliers and customers. Traditionally, an accountant or “junior accountant” is assigned to such tasks. Because there isn’t enough work with these tasks in my company to employ someone specifically, but due to the “volume” of financial operations, I must have some control, I decided to harness Excel for this task and entrust ChatGPT with the task of creating the necessary tools (scripts). Anticipating events, it turned out that properly formulating a “query” that ChatGPT will process into the appropriate code is not that simple, even though ChatGPT understands natural language and its nuances quite well. Or perhaps that’s exactly why – properly formulating the query is key. One could even say that you need to develop a kind of meta-language in “conversations” with ChatGPT. You also shouldn’t expect to get what you want on the first try. However, (attention, spoiler!) the final results exceeded my expectations. I got several great tools that have a direct, positive impact on my work, spending a fraction of the time I would have spent on manually completing these (repetitive) tasks. In turn, the discussions and subsequent iterative refining of the “product” of our joint work with ChatGPT gave me a lot of satisfaction. Below are some examples:
Example 1, VBA: Original query (machine translated): I need an Excel script. The script reviews column C in the Arkusz1 sheet from the row containing the word START to the keyword STOP. There are recurring strings in the column. Upon detecting a string that is different from the previous one, not including the keywords START and STOP, the script inserts an empty row above. At the same time, it calculates the sum of the values of cells in column G in the block that has thus been created, characterized by the same values in column C, and enters this value in the last row of this block in column N.
Example 2 – VBA: Original query (machine translated): The script is used to compare planned transfers, kept in Excel, with transfers actually realized, imported into Excel from online banking. Original query: I need a script to search for strings in excel. Search the range column P to the row containing the string STOP in Arkusz1, compare column T to the row with the keyword STOP in Arkusz2. Highlight non-empty cells in Arkusz1 column P, whose values do not have equivalents in the range column T Arkusz2, and if the word keyword O is not found in the corresponding row Arkusz1 column M to the row containing the string STOP in Arkusz2. Ignore empty cell values in Arkusz1 Column P and ignore empty cells in Arkusz 2 column T.