行跳过和删除列中其他所有单元格的问题 [英] Issues with Row Skipping and Deleting Every Other Cell in a Column

查看:54
本文介绍了行跳过和删除列中其他所有单元格的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我想将一列与另一列的第二行相匹配.也就是说,A1与B1相伴,A2与B3相伴,A3与B5相伴,依此类推.我尝试使用IF(MOD(ROW(),2)= 1,B1,"),但这仍然导致B2,B4,B6 ...以此类推.也就是说,实际显示的值只是B的奇数.本质上,我的问题是我试图将每隔一行有信息的列与每行有信息的列进行匹配.有没有一种方法可以使用OFFSET或类似的功能来完成此任务.或者,是否有任何简单的方法可以使Excel识别(根据CODE()函数)为空的单元格,以便我可以使用GoTo并将其删除,从而将该列合并为每行而不是每行一个信息两排?

Suppose I want to match up one column with every second row of another column. That is A1 goes with B1, A2 goes with B3, A3 goes with B5, and so on. I tried using IF(MOD(ROW(),2)=1,B1,"") but this still results in B2,B4,B6...and so on being skipped. That is, the values that actually show up are only the odd values of B. Essentially my issue is that I am trying to match up a column with information every other row to a column with information every row. Is there a way to use OFFSET or a similar function to accomplish this task. Alternatively, is there any easy way to get Excel to recognize the cells that (according to the CODE() function) are blank so that I can use GoTo and delete them, consolidating that column down to one piece of information per row instead of per two rows?

推荐答案

您可以使用Index()来获取数据.= Index(b:b,row()+ row()-row($ A $ 1)).

You could use Index() to get the data. =Index(b:b,row()+row()-row($A$1)).

这篇关于行跳过和删除列中其他所有单元格的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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