小编Jul*_*lia的帖子

Call a function from sub in vba

I wrote this function, which is supposed to take the user defined cell from a chosen range and add or multiply its value by an user defined number. The output should be an array with one changed cell.

I was able to compile it; however, I cannot call it.

I tried to replicate what this and this but it failed.

Function Macro1(cellref As Range, row_number As Long, column_number As Long, x As Double, method As Integer) As Variant
'Number, which …
Run Code Online (Sandbox Code Playgroud)

excel vba function

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

根据数字位置分割数字

我正在尝试创建一个new变量,该变量将存储第2个,第3个和第4个以及每个的最后三位数字tx。例如,第一个数字tx将是812500new

我做了这个

tx<-c(4812129004534500, 6430650557835, 579900098554, 382183224511777, 49057595473648551, 64951444098766, 649544543781, 87567909876421)
new <- sapply(tx, function(x) substring(x, first=c(2,3,4), last=3))
Run Code Online (Sandbox Code Playgroud)

但是输出是不可取的。

split r digits

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

标签 统计

digits ×1

excel ×1

function ×1

r ×1

split ×1

vba ×1