如何将数据从单元格复制到同一行上的其他单元格,测试它们是否为em [英] How can I copy data from a cell to other cells on same line, testing that they are em

查看:70
本文介绍了如何将数据从单元格复制到同一行上的其他单元格,测试它们是否为em的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,将A1复制到B1,但如果B1被占用,请尝试C1等,直到找到第1行的空单元格。

解决方案

这是用于MS-Excel是吗?

有几种方法可以做到这一点...

我的方法是设置家庭单元并存储值

然后使用偏移量从那里找到一个空单元格


请发布你到目前为止所尝试的内容,记住使用< CODE />格式化代码按钮。


  1. 将选择光标移动到单元格A1。
  2. 值是否为空?
  3. 是的。全部完成。在这里写下值。
  4. 不。使用 ActiveCell.Offset(0,1)检查单元格B1。价值是空的吗?
  5. 是的。全部完成。在这里写下值。
  6. 不。全部完成。在 ActiveCell.End(xlToRight).Offset(0,1)中写入值。


为什么不只是第6行?

Eg Copy A1 to B1 but if B1 is occupied try C1, etc until an empty cell on line 1 is found.

解决方案

This is for MS-Excel yes?
Several ways to do this...
My way is to set the home cell and store the value
then use the offset from there to find an empty cell

Please post what you have tried so far remembering to format your code using the <CODE/> button.


  1. Move the selection cursor to cell A1.
  2. Is the value empty?
  3. Yes. All done. Write value here.
  4. No. Using ActiveCell.Offset(0, 1) check cell B1. Is the value empty?
  5. Yes. All done. Write value here.
  6. No. All done. Write the value in ActiveCell.End(xlToRight).Offset(0,1).


Why not just line 6?


这篇关于如何将数据从单元格复制到同一行上的其他单元格,测试它们是否为em的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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