猫王唱Excel:少一点串联

Last Friday, January 8th, would have been Elvis Presley's 75th birthday. Sadly, he died in 1977, so he never had a chance to work with Microsoft Excel. Otherwise, he might have sung "A Little Less Concatenation", instead of "A Little Less Conversation."

1月8日,上星期五,是Elvis Presley诞辰75周年。 可悲的是,他于1977年去世,所以他再也没有机会使用Microsoft Excel。 否则,他可能演唱的是“少一点串联”而不是“少一点对话”。

Elvis' 1968 song, "A Little Less Conversation," was re-released in 2002. If you'd like to hear Elvis sing the original version, and see what parties looked like in 1968, there's a video at the end of this post.

猫王1968年的歌曲“一点点对话”在2002年重新发行。如果您想听猫王演唱原始版本,看看1968年的聚会是什么样子,那么本文结尾处有一段视频。

CONCATENATE功能 (The CONCATENATE Function)

With Excel's CONCATENATE function, you can combine text and numbers into one string. For example, this formula would combine the values in cells A2 and B2.

使用Excel的CONCATENATE函数,可以将文本和数字组合成一个字符串。 例如,此公式将合并单元格A2和B2中的值。

=CONCATENATE(A2,B2)

= CONCATENATE(A2,B2)

You can also use the ampersand operator – & – to combine text and numbers in Excel. In this example I've left spaces before and after the &, to make it easier to see, but you can omit them.

您也可以使用&运算符– –在Excel中组合文本和数字。 在此示例中,为了便于查看,我在&之前和之后都留了空格,但是您可以忽略它们。

=A2 & B2

= A2和B2

As you can see, it's much easier and quicker to type & , so that's what I use, instead of the CONCATENATE function. So, in Elvis' honour, here are some ways that you can combine text and numbers in Excel, with a little less CONCATENATE function.

如您所见,键入更加容易快捷,所以这就是我使用的,而不是CONCATENATE函数。 因此,以猫王的荣誉,您可以通过以下几种方式在Excel中结合文本和数字,而使用的CONCATENATE函数要少一些。

合并名字和姓氏 (Combine First and Last Names)

If you have last names in column A and first names in column B, you can combine them in column C, to create a full name. For example, to combine the last name in A3 with the first name in B3, use this formula: =B3 & A3

如果在A列中有姓氏,在B列中有姓氏,则可以在C列中组合它们以创建全名。 例如,要将A3中的姓氏与B3中的姓氏结合起来,请使用以下公式: = B3&A3

CombineNames01

In most cases, you'd want to show a space character between the first and last names. To do that, you can include a space character in quote marks in the formula:

在大多数情况下,您希望在名字和姓氏之间显示一个空格字符。 为此,您可以在公式的引号中包含一个空格字符:

=B3 & " " & A3

= B3&“”&A3

CombineNames02

合并文字和日期 (Combine Text and Dates)

You can also combine text with numbers or dates, but the number and date formatting is lost. In this example, the dates in column B are formatted as dd-mmm-yyyy.

您也可以将文本与数字或日期组合在一起,但是数字和日期格式会丢失。 在此示例中,B列中的日期格式为dd-mmm-yyyy。

When combined with the text in column A, the date's serial number appears, instead of the formatted date.

与A列中的文本结合使用时,将显示日期的序列号,而不是格式化的日期。

CombineDates01

To add formatting to dates and numbers, you can use the TEXT function. In the TEXT function, you refer to a cell, and specify the date or number format that you want to use.

要将格式添加到日期和数字,可以使用TEXT函数。 在TEXT函数中,您引用一个单元格,并指定要使用的日期或数字格式。

To keep the dd-mmm-yyyy format, you can use this formula:

要保留dd-mmm-yyyy格式,可以使用以下公式:

=A3 & " " & TEXT(B3,"dd-mmm-yyyy")

= A3&“”&TEXT(B3,“ dd-mmm-yyyy”)

CombineDates02

格式化示例 (Formatting Examples)

There are a few more formatting examples for the TEXT function on the Contextures website: Combine Data in Excel

Contextures网站上还有一些用于TEXT函数的格式设置示例: 在Excel中合并数据

少说话(1968年版) (A Little Less Conversation (1968 version))

As promised, here's Elvis singing the original version of "A Little Less Conversation" in the 1968 movie, "Live A Little, Love A Little."

如所承诺的,这是猫王在1968年的电影《活着一点,爱一点》中演唱的“少一点对话”的原始版本。

The next year there was a big festival at Woodstock, and parties eventually became a little less formal.

第二年在伍德斯托克(Woodstock)举行了一个大型节日,聚会最终变得不那么正式。

演示地址

_______

_______

翻译自: https://contexturesblog.com/archives/2010/01/11/elvis-sings-excel-a-little-less-concatenation/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值