三九宝宝网宝宝百科性格养成

excel2007编程第一列为日期数第二列是星期第三行为农历判

02月06日 编辑 39baobao.com

[属马农历生辰八字算命]公历(阳历):1990年3月17日9时0分农历(阴历):一九九○年二月廿一日巳时(庚午年 己卯月 辛巳日 癸巳时)此命盘的主人是 白蛇,出生于白马。日干代表命主,所以属 金 ◇一生总运势◇ 午年生...+阅读

至于要用到农历,那你的文件就是运行VBA。要是法定节日,那得你手动输入,倒不多。如果你愿意,我可以帮你解决你要的功能第一列,B2=????-??-??第二列,C2=WEEKDAY(B2,1)第三列,D2=calendar(B2) 注:此处calendar()函数为自定义函数,见后面解释第四列,E2= (是不是法定节假日,你只有查一下国务院放假规定)选择B2至E2,填充所要单元格。下面解释一下那个自定义函数:这个需要VBA了.按ALT+F11 再 插入 模块把下面的代码制复制到模块中,D2数据就生成了Option ExplicitDim WeekName

(7), MonthAdd

(11), NongliData(120), TianGan

(9), DiZhi

(11), ShuXiang

(11), DayName(30), MonName

(12)Dim curTime, curYear, curMonth, curDay, curWeekdayDim GongliStr, WeekdayStr, NongliStr, NongliDayStrDim i, m, n, k, isEnd, bit, TheDate, num1, num2Dim year, month, day, grid, grid_dateFunction calendar(grid)grid_date = gridyear = Mid(grid_date, 1, 4)num1 = InStr(grid_date, "-")num2 = InStr(6, grid_date, "-")If (num2 - num1) = 3 Then month = Mid(grid_date, 6, 2) day = Mid(grid_date, 9, 2)Else month = Mid(grid_date, 6, 1) day = Mid(grid_date, 8, 2)End If'星期名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) = "狗"ShuXiang

(11) = "猪"'农历日期名DayName(0) = "*"DayName

(1) = "初一"DayName

(2) = "初二"DayName

(3) = "初三"DayName

(4) = "初四"DayName

(5) = "初五"DayName

(6) = "初六"DayName

(7) = "初七"DayName

(8) = "初八"DayName

(9) = "初九"DayName

(10) = "初十"DayName

(11) = "十一"DayName

(12) = "十二"DayName(13) = "十三"DayName(14) = "十四"DayName(15) = "十五"DayName(16) = "十六"DayName(17) = "十七"DayName(18) = "十八"DayName(19) = "十九"DayName(20) = "二十"DayName(21) = "二十一"DayName(22) = "二十二"DayName(23) = "二十三"DayName(24) = "二十四"DayName(25) = "二十五"DayName(26) = "二十六"DayName(27) = "二十七"DayName(28) = "二十八"DayName(29) = "二十九"DayName(30) = "三十"'农历月份名MonName(0) = "*"MonName

(1) = "正"MonName

(2) = "二"MonName

(3) = "三"MonName

(4) = "四"MonName

(5) = "五"MonName

(6) = "六"MonName

(7) = "七"MonName

(8) = "八"MonName

(9) = "九"MonName

(10) = "十"MonName

(11) = "十一"MonName

(12) = "腊"'公历每月前面的天数MonthAdd(0) = 0MonthAdd

(1) = 31MonthAdd

(2) = 59MonthAdd

(3) = 90MonthAdd

(4) = 120MonthAdd

(5) = 151MonthAdd

(6) = 181MonthAdd

(7) = 212MonthAdd

(8) = 243MonthAdd

(9) = 273MonthAdd

(10) = 304MonthAdd

(11) = 334'农历数据NongliData(0) = 2635NongliData

(1) = 333387NongliData

(2) = 1701NongliData

(3) = 1748NongliData

(4) = 267701NongliData

(5) = 694NongliData

(6) = 2391NongliData

(7) = 133423NongliData

(8) = 1175NongliData

(9) = 396438NongliData

(10) = 3402NongliData

(11) = 3749NongliData

(12) = 331177NongliData(13) = 1453NongliData(14) = 694NongliData(15) = 201326NongliData(16) = 2350NongliData(17) = 465197NongliData(18) = 3221NongliData(19) = 3402NongliData(20) = 400202NongliData(21) = 2901NongliData(22) = 1386NongliData(23) = 267611NongliData(24) = 605NongliData(25) = 2349NongliData(26) = 137515NongliData(27) = 2709NongliData(28) = 464533NongliData(29) = 1738NongliData(30) = 2901NongliData(31) = 330421NongliData(32) = 1242NongliData(33) = 2651NongliData(34) = 199255NongliData(35) = 1323NongliData(36) = 529706NongliData(37) = 3733NongliData(38) = 1706NongliData(39) = 398762NongliData(40) = 2741NongliData(41) = 1206NongliData(42) = 267438NongliData(43) = 2647NongliData(44) = 1318NongliData(45) = 204070NongliData(46) = 3477NongliData(47) = 461653NongliData(48) = 1386...

以下为关联文档:

农历每个月份的天数怎么规定的月份分为大月和小月,大月三十天,小月二十九天,其平均历月等于一个朔望月。一年中哪个月大,哪个月小,由计算决定,为了协调朔望月与回归年之间的天数,于是便通过“置闰法”进行调整使...

我国的农历夏历是怎么计算每个月的天数的阴历全称“太阴历”或“纯阴历”。阴历根据月亮圆缺变化的周期,即朔望月制定的,因古人称月亮为“太阴”,所以称为“太阴历”,简称“阴历”。阴历产生的确切日期已难确定,但根据甲...

农历日期怎么算阳历日期推算阴历日期的方法:前已述及阴历日期是以月亮的圆缺为计月单位,其以逢朔为初一,以月望为十五(大月为十六日),以月晦为二十九日(大月为三十日)。然而目前记时通常用阳历日期...

农历与公历怎么算的?比如一月份农历怎么算?有公式吗公历和农历之间是不能换算的,二者采用的计算方法不同,没有特殊关系可以查询,只能分别计算。 阳历即太阳历,也就是公历,它是国际通用的。我国自民国元年起采用阳历,为与我国旧有之...

农历12个月分别怎么称呼十二个月的古风别称 一月:孟春、柳月、寅月、陬月、太簇、初春、新春、端月、岁始、肇春、初阳。 二月:仲春、卯月、如月、夹钟、花月、杏月、春半、花朝、殷春、春中。 三月:...

农历月份有什么别称一月:正月、端月、征月、开岁、华岁、早春、孟春、新正; 二月:命月、如月、丽月、杏月、酣香、仲春; 三月:蚕月、桃月、桐月、季春、晓春、鸢时、桃良、樱笋时; 四月:余月、阴月、...

推荐阅读
图文推荐