Excel上的星期几

时间:2017-07-14 16:35:03

标签: excel excel-vba excel-formula vba

我正在努力做一周的日子。我在Sheet1上有一个名为' Yr Overview'用户输入星期几的地方。

在第二页上,我通过使用= left(' Yr Overview'!A1,1)来引用它,这样用户就可以输入像Sunday这样的日子,如果只是将它显示为S.让它到目前为止。现在我试图让那个细胞效应在同一张纸上。

那就是A1 = S A2 = M(S + 1天)A3 = T(M + 1天)等。我似乎无法做到这一点,所以我只想问这是否可行?或者我是否需要使用VBA来实现这一目标。

4 个答案:

答案 0 :(得分:1)

在A2中试一试并复制:

=INDEX({"MON","TUE","WED","THU","FRI","SAT","SUN"},MATCH(UPPER(LEFT(A1,3)),{"SUN","MON","TUE","WED","THU","FRI","SAT"},0))

enter image description here

答案 1 :(得分:1)

试一试。在单元格A1中输入此公式,然后向右拖动。

=LEFT(TEXT(MATCH('Yr Overview'!$A$1,{"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"},0)+COLUMN()-1,"dddd"))

enter image description here

答案 2 :(得分:1)

以下解决方案仅在输入日期而非日期时才有用。

A1- 07/14/2017
A2=TEXT(A1+1,"dddd")
A3=TEXT(A1+2,"dddd")
A4=TEXT(A1+3,"dddd")
A5=TEXT(A1+4,"dddd")
A6=TEXT(A1+5,"dddd")
A7=TEXT(A1+6,"dddd")

答案 3 :(得分:0)

ITwilioRestClient中添加以下公式:

A2

假设在=IF(ROW()<8,IF(FIND(LOWER(LEFT(Sheet1!$A$1,3)),"montuewedthufrisatsun",1)+(ROW()-1)*3<=LEN("montuewedthufrisatsun"),UPPER(LEFT(MID("montuewedthufrisatsun",FIND(LOWER(LEFT(Sheet1!$A$1,3)),"montuewedthufrisatsun",1)+(ROW()-1)*3,3),1)),UPPER(LEFT(MID("montuewedthufrisatsun",FIND(LOWER(LEFT(Sheet1!$A$1,3)),"montuewedthufrisatsun",1)-(ROW()*-3+24),3),1))),OFFSET(A2,-7,0))

上的单元格A1中输入日期