小编oka*_*api的帖子

找到第一个空行,然后写入它

我需要在工作簿中找到第一个空行并将信息写入(row,1)和(row,2).我想我现在很困惑......

Function WriteToMaster(num, path) As Boolean

'Declare variables
Dim xlApp As Excel.Application
Dim wb As Workbook
Dim ws As Worksheet
Dim infoLoc As Integer

Set xlApp = New Excel.Application

Set wb = xlApp.Workbooks.Open("PATH OF THE DOC")
Set ws = wb.Worksheets("Sheet1")

'Loop through cells, looking for an empty one, and set that to the Num
Cells(1, 1).Select
For Each Cell In ws.UsedRange.Cells
    If Cell.Value = "" Then Cell = Num
    MsgBox "Checking cell " & Cell & " for value."
Next …
Run Code Online (Sandbox Code Playgroud)

excel vba excel-vba

8
推荐指数
2
解决办法
11万
查看次数

Python的Reduce函数 - 用Scheme编写

晚间!

我需要在Scheme中编写一个reduce函数,它就像Python中的内置reduce函数一样.在Scheme中编写reduce函数很容易:

(define (reduce fn lis identity)
  (if (null? lis)
    identity
    (fn (car lis)
        (reduce fn (cdr lis) identity))))
Run Code Online (Sandbox Code Playgroud)

但是,此代码与Python reduce不同,后者仅使用两个参数(函数和要减少的项列表).

任何人都可以我写一个这样工作的Scheme函数吗?

(>(reduce*'(2 4 5 5))=> 200,是我们教授的例子.)

非常感谢,伙计和女孩们.你是如此有帮助<3

ETA:对Levien先生和Jester-Young先生,非常感谢你.您提供了大量的信息,以帮助我自己解决问题.*拥抱

reduce scheme

0
推荐指数
1
解决办法
1113
查看次数

标签 统计

excel ×1

excel-vba ×1

reduce ×1

scheme ×1

vba ×1