同一列中每个单元格的值都相同吗? [英] Same value against each cell from a single column?

查看:41
本文介绍了同一列中每个单元格的值都相同吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一列如下:

Fruits:
Apple
Banana
Mango
Vegetables:
Broccoli
Tomato
Potatoes

我希望每个值在下面的单元格中的旁边都有其父名称:

I would like each value to have their parent name next to it in the cell like below:

Apple Fruit
Banana Fruit
Mango Fruit
Broccoli Vegetables
Tomato Vegetables
Potatoes Vegetables

我该如何实现?

推荐答案

按照我下面的屏幕截图,将下面的公式放到B1单元格中.

As per my below screenshot put below formula to B1 cell.

=IF(RIGHT(A2,1)=":",LEFT(A2,LEN(A2)-1),B1)

然后将以下公式放入C1单元格

Then put following formula to C1 cell

=FILTER(A2:B9,RIGHT(A2:A9,1)<>":")

这篇关于同一列中每个单元格的值都相同吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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