查找表/行中的所有非零值
搜索了一段时间,决定把它扔出去,看看是否有人可以为此提供一个好的方向。我的表有约 100 行(并且正在扩展),大约有 24 列,看起来像这样:
ID yr1 yr2 yr3 yr4
id1 $- $- $35 $-
id2 $40 $45 $- $-
id3 $35 $- $30 $37
我想忽略所有零值并创建一个如下所示的表表示(我不关心列标题):
ID
id1 $35
id2 $40 $45
id3 $35 $30 $37
似乎就像应该有一个简单的解决方案,但我还没有弄清楚。非常感谢任何帮助!
Been searching for awhile and decided to throw this out there to see if anyone could provide a good direction for this. My table has ~100 (and expanding) rows by about 24 columns and looks something like:
ID yr1 yr2 yr3 yr4
id1 $- $- $35 $-
id2 $40 $45 $- $-
id3 $35 $- $30 $37
I want to ignore all zero values and create a representation of this table that looks like this (I don't care about the column headings):
ID
id1 $35
id2 $40 $45
id3 $35 $30 $37
Seems like there should be a simple(ish) solution, but I haven't figured it out yet. Any help is greatly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
[更新:删除了最初的建议并替换为 VBA 解决方案]
[Update: Removed initial suggestion and replaced with VBA solution]