がんばって書いたんだし公開しておく。CPの入力してくれるだけだけど、それさえできればCP平均とかはCellに関数入れとけばすぐ出るのでだいぶ手間が省ける。ただデッキごとに関数の範囲を調整しないといけのが面倒。その辺もがんばればどうのこうのできそうなんだけどあきらめた。
↓のコードの意味がわからない人にはこの記事は全く価値がないし、意味がわかる人はもっと短くて便利なマクロを書けるはずなのでやっぱり価値がない。
ExcelじゃなくてOpen Officeのcalcで作ったのでExcelだと上手くいかないと思う。
Sub Main6
Dim l
For l=4 To 100
sheet = ThisComponent.Sheets( 0 )
cell = sheet.getCellByPosition( 0, l)
cellString = cell.getString
Dim num
num=cell(0,l).String
select case num
case"No001"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No002"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No003"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No004"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No005"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No006"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No007"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No008"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No009"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No010"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No011"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No012"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No013"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No014"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No015"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No016"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No017"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No018"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No019"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No020"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No021"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No022"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No023"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No024"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No025"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No026"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No027"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No028"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No029"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No030"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No031"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No032"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No033"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No034"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No035"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No036"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No037"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
ase"No038"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No039"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No040"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No041"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No042"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No043"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No044"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No045"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No046"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No047"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No048"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No049"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No050"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No051"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No052"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No053"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No054"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No055"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No056"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No057"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No058"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No059"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No060"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No061"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No062"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No063"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No064"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No065"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No066"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No067"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No068"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No069"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No070"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No071"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No072"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No073"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No074"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No075"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No076"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No077"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No078"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No079"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No080"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No081"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No082"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No083"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No084"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No085"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No086"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No087"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No088"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No089"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No090"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No091"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No092"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No093"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No094"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No095"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No096"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No097"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No098"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No099"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No100"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No101"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No102"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No103"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No104"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No105"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No106"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No107"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No108"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No109"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No110"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No111"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No112"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No113"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No114"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No115"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No116"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No117"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No118"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No119"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No120"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No121"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No122"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=400
case"No123"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=400
case"No124"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=400
case"No125"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=400
case"No126"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=400
case"No127"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No128"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=400
case"No129"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=400
case"No130"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=400
case"No131"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No132"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No133"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No134"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No135"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No136"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No137"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No138"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No139"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No140"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No141"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No142"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No143"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No144"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No145"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No146"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=300
case"No147"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No148"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No149"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No150"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No151"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No152"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No153"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No154"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No155"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No156"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No157"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No158"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No159"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No160"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No161"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No162"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No163"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No164"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No165"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No166"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No167"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No168"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No169"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No170"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No171"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No172"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No173"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No174"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No175"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No176"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No177"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No178"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No179"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No180"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No181"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No182"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No183"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No184"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No185"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No186"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No187"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No188"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No189"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No190"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No191"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No192"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No193"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No194"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No195"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No196"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No197"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No198"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No199"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No200"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No201"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No202"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No203"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No204"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No205"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No206"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No207"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No208"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=200
case"No209"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No210"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No211"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No212"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No213"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No214"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No215"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No216"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No217"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No218"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=250
case"No219"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No220"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No221"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No222"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No223"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No224"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=0
case"No225"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No226"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No227"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No228"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No229"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=150
case"No230"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No231"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No232"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No233"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No234"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No235"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No236"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No237"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No238"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No239"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No240"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No241"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No242"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No243"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No244"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No245"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No246"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No247"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No248"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No249"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No250"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No251"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No252"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No253"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=100
case"No254"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No255"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No256"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No257"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No258"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No259"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
case"No260"
ThisComponent.Sheets(0).getCellByPosition(5,l).value=50
End Select
Next l
End Sub
0 件のコメント:
コメントを投稿