我想用
=if((sumif(c1:c15,"ukw",b1:b15)>=12),(sumif(cX:c15,"ukw",bX:b15)),(sumif(c1:c15,"ukw",b1:b15))
现在我希望X
cX
中的C
自动更改为>=12
单元格编号,当添加满足条件public class Main {
public static void main(String[] args) {
Distance dist1 = new DistanceImplementation();
Distance obj2 = new DistanceImplementation();
dist1.setFeetAndInches(1, 8);
obj2.setFeetAndInches(3, 5);
System.out.println(dist1.getDistanceComparison(obj2));
}
}
public abstract class Distance {
protected int feet;
protected float inches;
abstract public void setFeetAndInches(int feet, float inches);
abstract public int getFeet();
abstract public float getInches();
abstract String getDistanceComparison(Distance dist2);
}
class DistanceImplementation extends Distance {
@Override
public void setFeetAndInches(int feet, float inches) {
this.feet = feet;
this.inches = inches;
}
@Override
public int getFeet() {
return this.feet;
}
@Override
public float getInches() {
return this.inches;
}
@Override
String getDistanceComparison(Distance dist2) {
// if (dist2) { ????????????
return null;
}
}
时。如何实现?
答案 0 :(得分:0)
您必须使用INDIRECT功能和SUMIF。
查看以下网站。他们有一些例子说明了用途。试一试 - 你应该可以解决这个问题。
https://www.thoughtco.com/excel-sum-indirect-dynamic-range-formula-3124100
https://superuser.com/questions/934329/how-to-use-indirect-with-a-sumif-formula-for-a-date-range
希望这有助于。