小说网 找小说 无限小说 烟雨红尘 幻想小说 酷文学 深夜书屋
上一页 1 ··· 122 123 124 125 126 127 128 129 130 ··· 137 下一页

2007年9月23日

反选EXCEL数据区域已选定的单元格

摘要: Sub 反选()Application.DisplayAlerts = FalseApplication.ScreenUpdating = FalseDim raddress As String, taddress As Stringraddress = Selection.Addresstadd... 阅读全文

posted @ 2007-09-23 13:57 王峰炬 阅读(291) 评论(0) 推荐(0) 编辑

n阶幻方的填法(n≥3)

摘要: 幻方,亦称纵横图。台湾称为魔术方阵。将自然数1,2,3,……n*n排列成一个n*n方阵,使得每行、每列以及两对角线上的各个数之和都相等,等于n/2*(n*n+1),这样的方阵称为幻方。例如:把1,2,3,4,5,6,7,8,9填入3*3的格子,使得:每行、每列、两条对角线的和是15。 ... 阅读全文

posted @ 2007-09-23 11:16 王峰炬 阅读(618) 评论(0) 推荐(0) 编辑

2007年9月21日

用VBA来解决大数据量计算逆矩阵的问题

摘要: EXCEL2003中应用minverse求逆矩阵,该函数在excel中的确存在计算范围上的限制,可能最大的计算范围是52*52。下面给出一个VBA的解法 Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Des... 阅读全文

posted @ 2007-09-21 13:54 王峰炬 阅读(315) 评论(0) 推荐(0) 编辑

2007年9月11日

一元三次方程求解

摘要: Sub SolveCubicEquations(ByVal CubicEquation As String, Optional ByVal x As String = "x", Optional ByRef result As String)Dim a As Single, b As Single... 阅读全文

posted @ 2007-09-11 23:29 王峰炬 阅读(160) 评论(0) 推荐(0) 编辑

2007年8月29日

回溯实现数组元素的排列组合

摘要: 参考http://blog.csdn.net/northwolves/archive/2007/08/29/1764177.aspx中的代码,将字符串数组x取n个元素进行排列组合: Sub getall(ByRef x() As String, ByVal n As Byte, Optional ... 阅读全文

posted @ 2007-08-29 17:57 王峰炬 阅读(150) 评论(0) 推荐(0) 编辑

回溯实现数字的排列组合

摘要: 从1--m中选n个数字的排列组合的简单实现,速度还可以: Sub getall(ByVal m As Byte, ByVal n As Byte, Optional types As Byte = 0)'types=0为排列 types=1 为组合Dim num As Long, i As Int... 阅读全文

posted @ 2007-08-29 17:41 王峰炬 阅读(191) 评论(0) 推荐(0) 编辑

最接近π值的5位分数的算法

摘要: 题目: 求一个分数,分子5位数(第1位不是0),分母也是5位数(第1位不是0),分子和分母这10个数正好由0到9这10个数字组成(不缺也不重复)。求最接近π值的那个分数 解法1(穷举法) Sub getit()Const num As Long = 3628800 ' 10!Dim tt As S... 阅读全文

posted @ 2007-08-29 10:24 王峰炬 阅读(439) 评论(0) 推荐(0) 编辑

2007年8月6日

列出一个工作簿中所有已使用的自定义函数

摘要: 需要添加对VB项目的信任 Sub UDFSOFACTIVEWORKBOOK()Dim sh As Worksheet, r As Range, dic As Object, i As Long, temp As String, vbcomp, s() As String, UDF As Strin... 阅读全文

posted @ 2007-08-06 00:30 王峰炬 阅读(124) 评论(0) 推荐(0) 编辑

2007年7月11日

What's The Greatest Software Ever Written?(From informationweek.com)

摘要: What's The Greatest Software Ever Written? Witness the definitive, irrefutable, immutable ranking of the most brilliant software programs ever hack... 阅读全文

posted @ 2007-07-11 17:47 王峰炬 阅读(122) 评论(0) 推荐(0) 编辑

2007年6月30日

调用EXCEL 实现阿拉伯数字转中文

摘要: 方法一: Private Sub Command1_Click()Dim xlapp As Object, n As Currency, temp As StringSet xlapp = CreateObject("Excel.Application")Randomizen = Int(Rnd ... 阅读全文

posted @ 2007-06-30 16:40 王峰炬 阅读(192) 评论(0) 推荐(0) 编辑

上一页 1 ··· 122 123 124 125 126 127 128 129 130 ··· 137 下一页

导航