当有空值时自动填充 [英] Autofill when there are blank values

查看:110
本文介绍了当有空值时自动填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要以下帮助。

我想要第一列:自动填充剩余的空格,直到找到另一个值。示例:RMDSADMN将被自动填充,直到找到TXAADGLI,然后这将自动填充到TXAADM,然后这将被填充一次,因为有一个空格。

I want for the first column: To auto fill the remaining blank spaces until another value is found. Example: RMDSADMN would be autofilled until TXAADGLI is found, then this would be autofilled until TXAADM, then this would get filled one time since there is one blank space.

我尝试添加输入框,我必须手动插入每个值的名称,但我的目标是自动检查值,而不是我插入它们。 / p>

I tried adding input boxes where I had to manually insert the name of each value but I am aiming for something that automatically checks the values, instead of me inserting them.

推荐答案

尝试,

with activesheet
    with .cells(1,1).currentregion
        .specialcells(xlcelltypeblanks).formular1c1 = "=r[-1]c"
        .value = value
    end with
end with

这篇关于当有空值时自动填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆