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) 我正在尝试创建一个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)
但是输出是不可取的。