Hi, I have an if/then statement that is way too long but i can not figure out how to solve the problem another way. This is what I am trying to do:
I have a column with days of the month. There are also some day codes that need to be converted to actual days of the month so
1-31 should stay the same
41 should change to "05"
43 should change to "25"
51-81 should remain the same but have 50 subtracted from them
and 99 should change to "15".
I could not figure out how to make elseif just leave the data as is so here is the gigantic if/then statement I created. Any help would be greatly appreciated.
IIf([Recovered Birds]![R Day]="41","05","") & IIf([Recovered Birds]![R Day]="42","15","") & IIf([Recovered Birds]![R Day]="43","25","") & IIf([Recovered Birds]![R Day]="99","15","") & IIf([Recovered Birds]![R Day]="01","01","") & IIf([Recovered Birds]![R Day]="02","02","") & IIf([Recovered Birds]![R Day]="03","03","")& IIf([Recovered Birds]![R Day]="04","04","") & IIf([Recovered Birds]![R Day]="05","05","") & IIf([Recovered Birds]![R Day]="06","06","") & IIf([Recovered Birds]![R Day]="07","07","") & IIf([Recovered Birds]![R Day]="08","08","") & IIf([Recovered Birds]![R Day]="09","09","")& IIf([Recovered Birds]![R Day]="10","10","") & IIf([Recovered Birds]![R Day]="11","11","") & IIf([Recovered Birds]![R Day]="12","12","") & IIf([Recovered Birds]![R Day]="13","13","") & IIf([Recovered Birds]![R Day]="14","14","") & IIf([Recovered Birds]![R Day]="15","15","")& IIf([Recovered Birds]![R Day]="16","16","") & IIf([Recovered Birds]![R Day]="17","17","") & IIf([Recovered Birds]![R Day]="18","18","") & IIf([Recovered Birds]![R Day]="19","19","") & IIf([Recovered Birds]![R Day]="20","20","") & IIf([Recovered Birds]![R Day]="21","21","")& IIf([Recovered Birds]![R Day]="22","22","") & IIf([Recovered Birds]![R Day]="23","23","") & IIf([Recovered Birds]![R Day]="24","24","") & IIf([Recovered Birds]![R Day]="25","25","") & IIf([Recovered Birds]![R Day]="26","26","") & IIf([Recovered Birds]![R Day]="27","27","")& IIf([Recovered Birds]![R Day]="28","28","") & IIf([Recovered Birds]![R Day]="29","29","") & IIf([Recovered Birds]![R Day]="30","30","") & IIf([Recovered Birds]![R Day]="31","31","") & IIf([Recovered Birds]![R Day]="51","01","") & IIf([Recovered Birds]![R Day]="52","02","")& IIf([Recovered Birds]![R Day]="53","03","") & IIf([Recovered Birds]![R Day]="54","04","") & IIf([Recovered Birds]![R Day]="55","05","") & IIf([Recovered Birds]![R Day]="56","06","") & IIf([Recovered Birds]![R Day]="57","07","") & IIf([Recovered Birds]![R Day]="58","08","")& IIf([Recovered Birds]![R Day]="59","09","") & IIf([Recovered Birds]![R Day]="60","10","") & IIf([Recovered Birds]![R Day]="61","11","") & IIf([Recovered Birds]![R Day]="62","12","") & IIf([Recovered Birds]![R Day]="63","13","") & IIf([Recovered Birds]![R Day]="64","14","")& IIf([Recovered Birds]![R Day]="65","15","")& IIf([Recovered Birds]![R Day]="66","16","") & IIf([Recovered Birds]![R Day]="67","17","") & IIf([Recovered Birds]![R Day]="68","18","") & IIf([Recovered Birds]![R Day]="69","19","") & IIf([Recovered Birds]![R Day]="70","20","") & IIf([Recovered Birds]![R Day]="71","21","")& IIf([Recovered Birds]![R Day]="72","22","") & IIf([Recovered Birds]![R Day]="73","23","") & IIf([Recovered Birds]![R Day]="74","24","") & IIf([Recovered Birds]![R Day]="75","25","") & IIf([Recovered Birds]![R Day]="76","26","") & IIf([Recovered Birds]![R Day]="77","27","")& IIf([Recovered Birds]![R Day]="78","28","") & IIf([Recovered Birds]![R Day]="79","29","") & IIf([Recovered Birds]![R Day]="80","30","") & IIf([Recovered Birds]![R Day]="81","31","")