在Excel中复制值N次 [英] Copy value N times in Excel

查看:174
本文介绍了在Excel中复制值N次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的列表:

  A     B
item1   3
item2   2
item3   4
item4   1

需要输出:

  A
item1
item1
item1
item2
item2
item3
item3
item3
item3
item4


推荐答案

这里是没有VBA的一种方法:

Here is one way of doing it without VBA:


  1. 在A的左边插入一列,

  2. 1 置于A1
  3. c $ c> = A1 + C1 在A2中并向下复制到A5
  4. 在B5中输入一个空字符串, $ c>')

  5. 在E1中输入 1 c> 2 在E2中,并向下复制以获得1,2,...,10

  6. 放置 = VLOOKUP ,$ A $ 1:$ B $ 5,2),然后复制下来。

  1. Insert a column to the left of A, so your current A and B columns are now B and C.
  2. Put 1 in A1
  3. Put =A1+C1 in A2 and copy down to A5
  4. Put an empty string in B5, by just entering a single quote (') in the cell
  5. Put a 1 in E1, a 2 in E2, and copy down as to get 1, 2, ..., 10
  6. Put =VLOOKUP(E1,$A$1:$B$5,2) in F1 and copy down.

像这样:

| A  | B     | C | D | E  | F     |
|----|-------|---|---|----|-------|
| 1  | item1 | 3 |   | 1  | item1 |
| 4  | item2 | 2 |   | 2  | item1 |
| 6  | item3 | 4 |   | 3  | item1 |
| 10 | item4 | 1 |   | 4  | item2 |
| 11 |       |   |   | 5  | item2 |
|    |       |   |   | 6  | item3 |
|    |       |   |   | 7  | item3 |
|    |       |   |   | 8  | item3 |
|    |       |   |   | 9  | item3 |
|    |       |   |   | 10 | item4 |

这篇关于在Excel中复制值N次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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