View Single Post
  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

And a much shorter version:

=LOOKUP(MOD(MONTH(C1),3),{0,1,2},{"04100","04101", "04102"})

"Duke Carey" wrote:

Maybe something like this would do the trick

=LOOKUP(MONTH(C2),{1,2,3,4,5,6,7,8,9,10,11,12},{"0 4101","04102","04100","04101","04102","04100","041 01","04102","04100","04101","04102","04100"})

Duke

"taxmom" wrote:

Hello everyone.

I have in C2 a date that is pulled from another cell

C2 = March 1, 2005

I have a formula that needs to be modified to include either:

=IF(MONTH(C2)=3,"04101",IF(MONTH(C2)=4,"04102",IF( MONTH(C2)=5,"04100",0)))

I would type out all of the months but we are only allowed 7 nested funcitons.

What I need is:
if the month is either 1,4,7, 10 return 04101
if the month is either 2,5,8,11 return 04102
if the month is either 3,6,9,12 return 04100
otherwise leave blank.

How do I say this in the formula?

I tried using the commas to separate the different months but the message
came up I had an something wrong.

=IF(MONTH(C2)=1,4,7,10,"04101",IF(MONTH(C2)=2,5,8, 11,"04102",IF(MONTH(C2)=3,6,9,12,"04100",0)))

Thanks for your help.