|
楼主 |
发表于 2009-6-9 18:42
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
自己试着修改一下,引用的数据还是对不上号,请帮忙看看
Sheets(1).Cells(idx + 3, 2) = tmp(0) '股票名称
If tmp(3) = 0 Then
Sheets(1).Cells(idx + 3, 3) = "-"
Sheets(1).Cells(idx + 3, 4) = "-" '最新价
Sheets(1).Cells(idx + 3, 5) = "-" '(最新价-昨收)/昨收
Sheets(1).Cells(idx + 3, 6) = "-" '最新价-昨收
Sheets(1).Cells(idx + 3, 7) = "-" '最高
Sheets(1).Cells(idx + 3, 8) = "-" '最低价
Sheets(1).Cells(idx + 3, 9) = "-" '
Sheets(1).Cells(idx + 3, 10) = "-" '
Else
Sheets(1).Cells(idx + 3, 5) = tmp(3) '最新价
Sheets(1).Cells(idx + 3, 4) = (tmp(3) - tmp(2)) / tmp(2) '(最新价-昨收)/昨收=涨跌幅
Sheets(1).Cells(idx + 3, 6) = tmp(3) - tmp(2) '最新价-昨收=涨跌额
Sheets(1).Cells(idx + 3, 7) = tmp(4) '最高价
Sheets(1).Cells(idx + 3, 8) = tmp(5) '最低价
Sheets(1).Cells(idx + 3, 9) = tmp(15) '换手率
Sheets(1).Cells(idx + 3, 10) = tmp(24) '量比
End If
Sheets(1).Cells(idx + 3, 14) = tmp(31) '时间
Case 18:
Sheets(1).Cells(idx + 3, 2) = tmp(1) '股票名称
Sheets(1).Cells(idx + 3, 4) = (tmp(6) - tmp(2)) / tmp(2) '(最新价-昨收)/昨收
Sheets(1).Cells(idx + 3, 5) = tmp(6) '最新价
Sheets(1).Cells(idx + 3, 6) = tmp(6) - tmp(2) '最新价-昨收=涨跌额
Sheets(1).Cells(idx + 3, 7) = tmp(4) '最高价
Sheets(1).Cells(idx + 3, 8) = tmp(5) '最低价
Sheets(1).Cells(idx + 3, 9) = tmp(15) '换手率
Sheets(1).Cells(idx + 3, 10) = tmp(24) '量比
Sheets(1).Cells(idx + 3, 14) = tmp(18) '时间 |
|