这款提示词让 AI 编写 Excel VBA 代码实现:在已打开的工作簿中找到名为「Sheet1」的工作表并读取 A 列数据,根据读取到的数据依次创建同名新工作表,再将 Sheet1 的 A 列每行值转换为指向对应新工作表的超链接,点击即可跳转,并要求提供代码的详细步骤与逐步解释,适用于 Excel 自动化处理。

中文版提示词

请问能否帮我编写一段 Excel VBA 代码,实现以下功能:1. 在已打开的工作簿中,找到名为「Sheet1」的工作表,并读取 A 列中的数据;2. 根据读取到的数据,依次在同一工作簿中创建新的工作表,新工作表的名称应与 A 列中相应行的值相同,例如如果 A1 的值是「Test1」,则创建的第一个新工作表的名称应为「Test1」,类似地如果 A2 的值是「Test2」,则创建的第二个新工作表的名称应为「Test2」,以此类推;3. 在「Sheet1」的 A 列中,将每行的值转换为超链接,链接指向新创建的对应工作表,点击超链接后应能自动跳转到对应的工作表。另外,能否提供该 VBA 代码的详细步骤,并解释每一步的作用?

英文版提示词

Could you help me write an Excel VBA code to implement the following: 1. In the open workbook, find the worksheet named "Sheet1" and read the data in column A; 2. Based on the data read, create new worksheets in the same workbook one by one, with each new worksheet named after the value in the corresponding row of column A (for example, if A1 is "Test1", the first new worksheet should be named "Test1"; similarly, if A2 is "Test2", the second new worksheet should be named "Test2", and so on); 3. In column A of "Sheet1", convert each row's value into a hyperlink pointing to the corresponding newly created worksheet, so that clicking the hyperlink automatically jumps to that worksheet. Also, could you provide detailed steps for this VBA code and explain the purpose of each step?

🛠️ **适用 AI 工具**:Claude、ChatGPT、Cursor、Copilot、DeepSeek、Gemini