Tag: 渐变

Excelmacros不分配给一定范围的单元格的比例渐变颜色

我需要写一个这样的macros:我用一种紫色填充A1。 然后当我运行macros时,A2应该稍微轻一点,A3甚至更轻…等,直到A20是白色的。 但是这种颜色变化不应该是成比例的,即细胞边缘的颜色变化应该是下降的(例如,A2比A1更大程度地比A2更轻)。 底线是:细胞应该变得更加光滑但不成比例。 到目前为止,我有以下代码: Sub Macro3() Dim firstCell As Range 'the first cell, and the cell whose color will be used for all others. Dim cellColor As Long 'the cell color that you will use, based on firstCell Dim allCells As Range 'all cells in the column you want to color Dim c As […]

使用LINEST 5000次进行梯度计算,无需手动input代码

我正在尝试对一组力 – 距离曲线数据执行梯度计算。 我似乎有100组数据(x,y)的计算代码,尽pipe手动将此数值设置为5000会花费大量时间。 我想知道是否有一个函数可以执行以计算5000组x,y数据。 它是一个循环function? 对不起,但我是一个生物物理学家和新的编码。 下面是我的代码的一些例子: Sub S_Grad_Extraction() ' ' S_Grad_Extraction Macro ' ' Sheets.Add After:=ActiveSheet ActiveCell.FormulaR1C1 = _ "=LINEST(Sheet1!R[10]C:R[14]C,Sheet1!R[10]C[1]:R[14]C[1])" Range("A2").Select ActiveCell.FormulaR1C1 = _ "=LINEST(Sheet1!R[9]C[2]:R[13]C[2],Sheet1!R[9]C[3]:R[13]C[3])" Range("A3").Select ActiveCell.FormulaR1C1 = _ "=LINEST(Sheet1!R[8]C[4]:R[12]C[4],Sheet1!R[8]C[5]:R[12]C[5])" Range("A4").Select ActiveCell.FormulaR1C1 = _ "=LINEST(Sheet1!R[7]C[6]:R[11]C[6],Sheet1!R[7]C[7]:R[11]C[7])" Range("A5").Select 编辑:添加到代码块