chatgpt安装

当前位置: 主页 > chatgpt安装

真没想到(利用ChatGPT写代码)利用ChatGPT写小说,利用chatgpt处理Excel,

时间:2023-04-24 21:59:28|栏目:chatgpt安装|点击:

一 序言

从前用chatgpt主要就做概要,此次重新加入地球自学到了怎样用chatgpt处置Excel,尽管那时处置出来还并非很方便快捷,用熟识了(主要就是熟识提示重要信息词),处置出来会非常慢的。

二 预备组织工作

两个需用的chatgpt帐号,或是是提出申请透过new bing的试验帐号。其它前提:

应用程序用Edge。装上了Mod Header应用程序实用性X-Forwarded-For值8.8.8.8自然科学玩游戏了,将应用程序的边线重要信息明令禁止掉。加装Edge应用程序chattonai即chatgpt英文,从前我即使自然科学玩游戏也封禁chatgpt,透过点选那个应用程序重定向到chatgpt的网页居然是ok的,也能恒定登入。

三 预备统计数据

虽然我的捷伊Edge的版加装数次都有难题,想了许多配套措施,都难以加装,最终选用用skype的bing机器,我觉得那个机器和skype的效用相差无几。

让它给他们预备点统计数据:

拷贝统计数据到Excel中:

四 借助ai帮他们谋福利

4.1 基本上式子

假如他们须要对大部份的薪水请降,但忘掉了请降式子,能问它:

计算结果如下:

假如想查询周九的基本上薪水,能问下bing具体的Excel式子:

将式子贴进去:

五 做点更复杂的事情

他们知道Excel中,VBA脚本能完成更复杂的操作,假如他们须要将标题设置成红色,下面每一行奇数行设置为蓝色,偶数行设置为淡蓝色。根据他们的要求设置提示重要信息词:"写VBA,第一行A列到F列设置为红色,从第二行开始奇数行设置为蓝色,偶数行设置为淡蓝色"

5.1 设置表格样式VBA脚本

问下bing怎样写那个VBA

没有告诉他们具体怎样新建VBA等,能问下chatgpt,看看是否能回单的更详细点:

继续询问怎样新建:

按照提示重要信息来操作一把,将vba脚本贴入以后,点选运行:

关闭窗口后,按Alt+F8,进行选择他们新建的宏,应用效用:

发现有点不对,为啥后面的行都设置为红色了,重新更改提示重要信息词询问:"写入VBA时,将第一行A到F列设置为红色,从第二行到最终一行,将奇数行设置为蓝色,将偶数行设置为浅蓝色"

仍然不对:

在更改提示重要信息词询问:" When writing VBA, set the background color of the first row A to F to red; from the second row to the last row, set the background color of odd rows to blue, set the background color of even rows to light blue, and do not set it if there is no data in this row."

此次提供的vba脚本就没难题了:

Sub FormatRows() Dim lastRow As Long lastRow = Cells(Rows.Count, "A").End(xlUp).Row get last row with data set format for first row Range("A1:F1").Interior.Color = RGB(255, 0, 0) set red color for columns A to F in row 1 set format for odd and even rows with data For i = 2 To lastRow loop through rows with data If WorksheetFunction.CountA(Range("A" & i & ":F" & i)) > 0 Then check if row has data If i Mod 2 = 0 Then check if row number is even Range("A" & i & ":F" & i).Interior.Color = RGB(135, 206, 235) set light blue color for columns A to F in even rows Else row number is odd Range("A" & i & ":F" & i).Interior.Color = RGB(153, 204, 255) set blue color for columns A to F in odd rows End If End If Next i End Sub

最终更改样式脚本

5.2 生成统计图的vba脚本

提示重要信息词:"写VBA程序,统计数据范围C2到C17的统计数据,在当前组织工作区生成柱状图,其中5000到10000两个区间,10000到15000两个区间,15000以上作为两个区间,柱状图的标题为基本上薪水统计" bing给出的vba脚本:

您好,您能使用以下标识符来生成柱状图: Sub CreateChart() Dim MyChart As Chart Set MyChart = ActiveSheet.Shapes.AddChart2(251, xlColumnClustered).Chart MyChart.SetSourceData Source:=Range("C2:C17") MyChart.HasTitle = True MyChart.ChartTitle.Text = "基本上薪水统计" MyChart.Axes(xlCategory).TickLabels.NumberFormatLocal = "0.00" MyChart.Axes(xlValue).TickLabels.NumberFormatLocal = "0.00" MyChart.Axes(xlValue).MinimumScale = 5000 MyChart.Axes(xlValue).MaximumScale = 15000 MyChart.Axes(xlValue).MajorUnit = 5000 End Sub 这段标识符将统计数据范围C2到C17的统计数据生成柱状图,并将500010000100001500015000以上作为三个区间。柱状图的标题为“基本上薪水统计”。要执行此VBA,请按下Alt + F11打开Visual Basic Editor,然后在左侧的“项目资源管理器”窗格中选择要更改的组织工作簿。然后,单击“插入”菜单上的“模块”,并将标识符拷贝到新模块

注意标识符中的双引号都写成了"须要转义下,结果不对:

经过数次尝试,最终透过chatgpt完成最终效用:提示重要信息词:“写VBA程序,其中C列为基础薪水,统计基础薪水的范围,基础薪水的统计数据是C2到C17的统计数据,在当前组织工作区生成柱状图。同时划分为3个区间,区间范围为基础薪水在5000到10000,10000到15000,15000以上,注意不能更改任何统计数据” 英语提示重要信息词:

Write VBA program, in which C lists the base salary, statistics the range of the base salary, the basic salary data is C2 to C17 data, in the current work area to generate a bar chart. At the same time, it is divided into three intervals, which range from 5000 to 10,000 to 15000 and above. Note that no data can be changed.

我将汉语翻译成英文提示重要信息,据说汉语提问比较容易被封帐号,最终效用如下:

最终效用

Sub GenerateSalaryChart() Declare variables Dim wb As Workbook Dim ws As Worksheet Dim salaryRange As Range Dim salaryData As Variant Dim lowRange As Long Dim medRange As Long Dim highRange As Long Dim salaryCount(2) As Integer Dim i As Long Set the workbook and worksheet Set wb = ThisWorkbook Set ws = wb.ActiveSheet Set the salary range Set salaryRange = ws.Range("C2:C17") salaryData = salaryRange.Value Set the intervals lowRange = 5000 medRange = 10000 highRange = 15000 Loop through the data and count the number of salaries in each interval For i = LBound(salaryData) To UBound(salaryData) If salaryData(i, 1) >= lowRange And salaryData(i, 1) <= medRange Then salaryCount(0) = salaryCount(0) + 1 ElseIf salaryData(i, 1) > medRange And salaryData(i, 1) <= highRange Then salaryCount(1) = salaryCount(1) + 1 ElseIf salaryData(i, 1) > highRange Then salaryCount(2) = salaryCount(2) + 1 End If Next i Create a new chart and set the chart type to column chart Dim chartObj As ChartObject Set chartObj = ws.ChartObjects.Add(Left:=250, Width:=400, Top:=10, Height:=250) chartObj.Chart.ChartType = xlColumnClustered Set the chart title chartObj.Chart.HasTitle = True chartObj.Chart.ChartTitle.Text = "Basic Wage Statistics" Add the data series to the chart Dim chartSeries As Series Set chartSeries = chartObj.Chart.SeriesCollection.NewSeries chartSeries.Name = "Salary" chartSeries.Values = salaryCount Set the axis labels and tick marks With chartObj.Chart.Axes(xlCategory, xlPrimary) .CategoryNames = Array("5000-10000", "10000-15000", ">15000") .TickLabels.NumberFormat = "0" End With End Sub

六 总结

透过上面的一系列例子,觉得提示重要信息词非常关键,假如问的方法不对,不够准确,给你提供的答案很可能有难题,既要表达清晰,又要简洁,也许我用的是chatgpt的普通版,plus版也许更强大。

对于chatgpt来说,应用范围越来越广,在知识地球中和极客时间中也看到了不同的玩法,比如生成思维导图、总结文档、根据你提供的重要信息来完成难题的回答,以及这篇介绍的处置Excel统计数据,越来越多的见识到chatgpt的强大,更可怕的是它还在一直进化之中,打不过就重新加入,逐步熟练掌握chatgpt的人将成为效率十倍的组织工作者,再加上点好思路,借助chatgpt做一波创业应该也不错的。

上一篇:深度揭秘(赓续怎么读)赓续精神血脉,传承红色基因,(续)chatgpt怎么构建web页面聊天,

栏    目:chatgpt安装

下一篇:新鲜出炉(为什么你的插头)为什么你的产品卖不好,为什么你的chatgpt账号会被封?,

本文标题:真没想到(利用ChatGPT写代码)利用ChatGPT写小说,利用chatgpt处理Excel,

本文地址:http://www.shopify123.cn/chatgptanzhuang/4121.html

| |

/uploads/allimg/20230913/1-230913232SH48.jpg

联系QQ:1303712368 | 邮箱:fy669088

Copyright © 2002-2024 ChatGPT-Sora-人工智能AI 版权所有桂ICP备2021004354号-4