如何让电子表格单元格返回自己的值 - 1?

时间:2017-05-01 20:06:45

标签: excel spreadsheet

如果它的值大于7.5,我想让单元格M4从自身中减去1。我目前正在使用公式= SUM(L4-K4)* 24。

这甚至可能吗?理想情况下,我不想添加另一列

1 个答案:

答案 0 :(得分:1)

这样的事情:

mydata=data.frame(f1=c("yes","yes","no","no"),f2=c("yes","no","no","yes"))
mydata[1:ncol(mydata)]=lapply(mydata[1:ncol(mydata)],factor)

mymatrix=as.matrix(mydata)

#this line didn't help (the matrix still string)
mymatrix=apply(mymatrix,FUN =factor,MARGIN = 2)

一个注意事项,就像你拥有它一样,你不需要SUM():

=IF(SUM(L4-K4)*24>7.5,SUM(L4-K4)*24-1,SUM(L4-K4)*24)