Excel在没有预设范围的情况下计算出现次数

时间:2017-03-20 23:39:05

标签: excel count excel-formula formula subtotal

晚上好。我想知道每个公司每个国家有多少个办事处。例如,24 Hour Fitness的办公室如下:

def getNearestPointInPerimeter(self, left, top, width, height, x, y):
    right = left + width
    bottom = top + height

    clamp = lambda value, minv, maxv: max(min(value, maxv), minv)
    x = clamp(x, left, right)
    y = clamp(y, top, bottom)

    dl = abs(x - left)
    dr = abs(x - right)
    dt = abs(y - top)
    db = abs(y - bottom)
    m = min(dl, dr, dt, db)

    if m == dt:
        result = (x, top)
    elif m == db:
        result = (x, bottom)
    elif m == dl:
        result = (left, y)
    else:
        result = (right, y)

    return result

我可以对它进行小计,但我希望它在自己的专栏中。我已尝试分段执行此操作,但由于整个工作表超过168K行,因此需要很长时间。有人可以帮我一把吗?

Spreadsheet Snapshot]

1 个答案:

答案 0 :(得分:0)

这对你有用吗?放在while True: try: if '?' in tokens.text: toks.remove('?') except: try: if ',' in tokens.text: toks.remove(',') except: try: if 'you' in tokens.text: toks.remove('you') except: break 并向下拖动

C2