简体   繁体   English

Excel公式只显示月份和年份?

[英]Excel formula to display ONLY month and year?

Looking for an excel formula that will display "13-Aug" and means August of 2013. I would ideally want to copy the "13-Aug" cell to the 11 cells on its right, incrementing the month and appropriate year each time, so it would look like: 寻找将显示“13-Aug”并且意味着2013年8月的excel公式。我理想地希望将“13-Aug”单元格复制到右侧的11个单元格,每次增加月份和适当的年份,所以它看起来像:

"13-Aug", "13-Sep", ..., "13-Dec", "14-Jan", "14-Feb" “13-Aug”,“13-Sep”,......,“13-Dec”,“14-Jan”,“14-Feb”

There are a number of ways to go about this. 有很多方法可以解决这个问题。 One way would be to enter the date 8/1/2013 manually in the first cell (say A1 for example's sake) and then in B1 type the following formula (and then drag it across): 一种方法是在第一个单元格中手动输入日期8/1/2013 (例如说A1 ),然后在B1键入以下公式(然后将其拖过):

=DATE(YEAR(A1),MONTH(A1)+1,1)

Since you only want to see month and year, you can format accordingly using the different custom date formats available. 由于您只想查看月份和年份,因此可以使用可用的不同自定义日期格式进行相应格式化。

The format you're looking for is YY-Mmm . 你要找的格式是YY-Mmm

试试这个公式

=TEXT(TODAY(),"MMYYYY")

First thing first. 首先是第一件事。 set the column in which you are working in by clicking on format cells->number-> date and then format eg Jan-16 representing Jan, 1, 2016. and then apply either of the formulas above. 通过单击格式单元格 - >数字 - >日期然后格式化例如2016年1月1日的Jan-16格式来设置您在其中工作的列。然后应用上述任一公式。

Very easy, trial and error. 很容易,反复试验。 Go to the cell you want the month in. Type the Month, go to the next cell and type the year, something weird will come up but then go to your number section click on the little arrow in the right bottom and highlight text and it will change to the year you originally typed 转到您想要月份的单元格。键入月份,转到下一个单元格并键入年份,会出现一些奇怪的内容,然后转到您的数字部分,单击右下角的小箭头并突出显示文本及其将更改为您最初键入的年份

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM