返回列表 上一主題 發帖

[發問] 農曆24節氣

[發問] 農曆24節氣

請問excel可否以西曆換算出農曆24節氣嗎?

回復 6# jeffrey628litw


    非常感謝

TOP

感謝分享~ 非常感謝哩~

TOP

回復 6# jeffrey628litw
可以用了, 謝謝!!

TOP

本帖最後由 jeffrey628litw 於 2014-2-16 13:06 編輯

回復 5# ling822


    版大您好,這裡有暫時下載網站:http://www.FunP.Net/238190

附件我有重新更新請再試試看。

行事曆.rar (606.59 KB)

TOP

回復 2# jeffrey628litw


    謝謝Jeffrey, 權限問題未能下載

TOP

回復 2# jeffrey628litw
大大你好!
打開後靜止不動!?
根版本有關嗎?我的是2003

TOP

24節氣表.gif

24節氣表.rar
http://www.mediafire.com/download/pcbhjfk4jjyzoll/24%E7%AF%80%E6%B0%A3%E8%A1%A8.rar
  1. Option Explicit

  2. Const baseYrow = 1870, sTermCol = 4
  3. Dim sTerm As Variant
  4. Dim x As Object

  5. Function getsTermY(ByVal sY As Integer) As String
  6.    Dim tempsTermYstr As String
  7.    Dim i As Integer
  8.    Set x = ActiveWorkbook.Sheets("24節氣表")
  9.    
  10.    tempsTermYstr = x.Cells(sY - baseYrow, sTermCol)
  11.    ReDim sTerm(24)
  12.    For i = 1 To 24
  13.       sTerm(i) = Val(Mid(tempsTermYstr, i, 1))
  14.       If Int((i + 1) / 2) = i / 2 Then
  15.          sTerm(i) = sTerm(i) + 15
  16.       End If
  17.    Next i
  18.    getsTermY = tempsTermYstr
  19. End Function

  20. Function 建立全年24節氣表(sY)
  21.    Dim ff As String
  22.    Dim i As Integer
  23.    Set x = ActiveWorkbook.Sheets("24節氣表")
  24.    x.Cells(5, 2) = "西元 " & sY & "年 24節氣日期表"
  25.    ff = getsTermY(sY)
  26.    For i = 1 To 24
  27.       x.Cells(8, i + 2) = sTerm(i)
  28.    Next i
  29. End Function
複製代碼

TOP

回復 1# ling822


    版大您好,這裡有我以前抓的大陸行事曆,是用Excel製作的,裡面有萬年曆及節氣等。

行事曆.rar (461.89 KB)

TOP

        靜思自在 : 是非當教育,讚美作警惕。
返回列表 上一主題