陰曆轉農曆查詢?
excel如何農曆轉換陽曆公式
比如今天是2010年9月2日,用以下公式就可以得出農曆七月二十四:
雖然在遇到閏月時,顯示結果有點差強人意,如下圖中,2010年2月9日的農曆應是十二月二十六,但因為那年有個閏五月,就無辜多出來一個月了。不過總比編程式碼要快捷多了吧,而且閏月也不是天天有。
假如把公式改成:=MID("甲乙丙丁戊己庚辛壬癸",MOD(TEXT(A2,"[$-130000]e")-4,10)+1,1)&MID("子醜寅卯辰巳午未申酉戌亥",MOD(TEXT(A2,"[$-130000]e")-4,12)+1,1)&"年"&TEXT(A2,"[$-130000][DBNum1]m月")&TEXT(A2,IF(--TEXT(A2,"[$-130000]d")=10,"初十",IF(--TEXT(A2,"[$-130000]d")>10,"[$-130000][DBNum1]d","初[$-130000][DBNum1]d"))),那就更像農曆表示法了,不過因為農曆每年開始日期都不一樣,所以函式很難達到十分精確的結果,只能是將就著用。
Excel 中陽曆日期如何轉換成陰曆日期?
2007版的excel可用下面公式轉換:
=TEXT(A1,"[$-130000]yyyy年m月"&IF(LEN(--TEXT(A1,"[$-130000]dd"))=1,"初","")&"d")
在EXCEL中怎樣把公曆轉換成農曆
Dim WeekName(7), MonthAdd(11), NongliData(99), TianGan(9), DiZhi(11), ShuXiang(11), DayName(30), MonName(12)
Dim curTime, curYear, curMonth, curDay, curWeekday
Dim GongliStr, WeekdayStr, NongliStr, NongliDayStr
Dim i, m, n, k, isEnd, bit, TheDate
Private Sub Form_Load()
'獲取當前系統時間
curTime = Now()
'星期名
WeekName(0) = " * "
WeekName(1) = "星期日"
WeekName(2) = "星期一"
WeekName(3) = "星期二"
WeekName(4) = "星期三"
WeekName(5) = "星期四"
WeekName(6) = "星期五"
WeekName(7) = "星期六"
'天干名稱
TianGan(0) = "甲"
TianGan(1) = "乙"
TianGan(2) = "丙"
TianGan(3) = "丁"
TianGan(4) = "戊"
TianGan(5) = "己"
TianGan(6) = "庚"
TianGan(7) = "辛"
TianGan(8) = "壬"
TianGan(9) = "癸"
'地支名稱
DiZhi(0) = "子"
DiZhi(1) = "醜"
DiZhi(2) = "寅"
DiZhi(3) = "卯"
DiZhi(4) = "辰"
DiZhi(5) = "巳"
DiZhi(6) = "午"
DiZhi(7) = "未"
DiZhi(8) = "申"
DiZhi(9) = "酉"
DiZhi(10) = "戌"
DiZhi(11) = "亥"
'屬相名稱
ShuXiang(0) = "鼠"
ShuXiang(1) = "牛"
ShuXiang(2) = "虎"
ShuXiang(3) = "兔"
ShuXiang(4) = "龍"
ShuXiang(5) = "蛇"
ShuXiang(6) = "馬"
ShuXiang(7) = "羊"
ShuXiang(8) = "猴"
ShuXiang(9) = "雞"
ShuXiang(10) = &q......餘下全文>>
電子表格中怎樣將農曆轉換為公曆
1、農曆轉換為公曆,首先需要一個農曆和公曆的對照表
2、假設對照表的格式為:A列為農曆,B列為公曆。
3、此時可以用VLOOKUP函式進行轉換,公式為:=VLO暢KUP(需要轉換的農曆日期,A:B,2,0)
4、特別注意:需要轉換的農曆日期必須與對照表中A列格式一致。
如何在Excel中轉換陰曆陽曆
可以啊,不過比較複雜。參看excelhome論壇:
http://club.excelhome.net/dispbbs.asp?BoardID=3&ID=26011&replyID=&skin=0
下載裡面的Excel附件。
可能需要註冊一下。
求農曆公曆轉換演算法
程式設計不太懂
傳下來 口訣
乘五除四九加日
雙月間隔三十天。
一二自加整少一,
三五七八十尾前。
具體的演算法你可網上找下資料 百度上很多的 我就不多累贅了的
如何在excel表中將陰曆生日批量轉換成陽曆? 5分
將下面面這段程式碼儲存在模組中,就可以用公式 =nongli(A1) 呼叫了。
Public Function NongLi(Optional XX_DATE As Date)
Dim MonthAdd(11), NongliData(99), TianGan(9), DiZhi(11), ShuXiang(11), DayName(30), MonName(12)
Dim curTime, curYear, curMonth, curDay
Dim GongliStr, NongliStr, NongliDayStr
Dim i, m, n, k, isEnd, bit, TheDate
'獲取當前系統時間
curTime = XX_DATE
'天干名稱
TianGan(0) = "甲"
TianGan(1) = "乙"
TianGan(2) = "丙"
TianGan(3) = "丁"
TianGan(4) = "戊"
TianGan(5) = "己"
TianGan(6) = "庚"
TianGan(7) = "辛"
TianGan(8) = "壬"
TianGan(9) = "癸"
'地支名稱
DiZhi(0) = "子"
DiZhi(1) = "醜"
DiZhi(2) = "寅"
DiZhi(3) = "卯"
DiZhi(4) = "辰"
DiZhi(5) = "巳"
DiZhi(6) = "午"
DiZhi(7) = "未"
DiZhi(8) = "申"
DiZhi(9) = "酉"
DiZhi(10) = "戌"
DiZhi(11) = "亥"
'屬相名稱
ShuXiang(0) = "鼠"
ShuXiang(1) = "牛"
ShuXiang(2) = "虎"
ShuXiang(3) = "兔"
ShuXiang(4) = "龍"
ShuXiang(5) = "蛇"
ShuXiang(6) = "馬"
ShuXiang(7) = "羊"
ShuXiang(8) = "猴"
ShuXiang(9) = "雞"
ShuXiang(10) = "狗"
ShuXiang(11) = "豬"
'農曆日期名
DayName(0) = "*"
DayName(1) = "初一"
DayName(2) = "初二"
DayName(3) = "初三"
DayName(4) = "初四"
DayName(5) = "初五&q......餘下全文>>