Created
January 28, 2014 05:29
-
-
Save Shinichi-Ohki/8662707 to your computer and use it in GitHub Desktop.
B列に入ってる曜日が月〜金でC列になにか記入されているセルを数える式と、土日祝で(略)を出力するRubyスクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
1.upto(31){|num| | |
if num==1 | |
print("=") | |
else | |
print("+") | |
end | |
print("and(or($B$%d=\"月\",$B$%d=\"火\",$B$%d=\"水\",$B$%d=\"木\",$B$%d=\"金\"),C$%d<>\"\")"%[num+1,num+1,num+1,num+1,num+1,num+1]) | |
# ) | |
} | |
print("\n") | |
1.upto(31){|num| | |
if num==1 | |
print("=") | |
else | |
print("+") | |
end | |
print("and(or($B$%d=\"土\",$B$%d=\"日\",$B$%d=\"祝\"),C$%d<>\"\")"%[num+1,num+1,num+1,num+1]) | |
# ) | |
} | |
print("\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment