Need help with code!

walky82

New Member
Joined
May 18, 2008
Messages
40
Hey can some one please help me....

I am not to sure why this code is not working....

=IF(AND((D17=6),((YEAR(NOW())-YEAR(K5))<25),(N13>=3),(F11+H11+J11+L11+N11)=0),5,IF(AND((D17=6),((YEAR(NOW())-YEAR(K5))<25),(N13>=5),(F11+H11+J11+L11+N11)=0),3,D17))

All i want this to do is.... either put a 5 or a 3 and if not just put whatever is in D17, but it wont work...

Thanks heaps in advance!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Try:
=(D17=6)*(YEAR(NOW()-YEAR(K5))<25)*(F11+H11+J11+L11+N11=0)*IF(N13>=5,3,IF(N13>=3,5,D17))

Regards
Northwolves
 
Upvote 0
All i want this to do is.... either put a 5 or a 3 and if not just put whatever is in D17, but it wont work...
-------------------
A bit Ambiguous ,maybe an example can help you to Explanate it.

Regards
Northwolves
 
Upvote 0
Sorry mate about the ambiguity.. This a two scenarios that can be either true or false...<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
=IF(AND((D17=6),((YEAR(NOW())-YEAR(K5))<25),(N13>=3),(F11+H11+J11+L11+N11)=0),5, - If this statement is true a 5 will be entered into that cell. <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
IF(AND((D17=6),((YEAR(NOW())-YEAR(K5))<25),(N13>=5),(F11+H11+J11+L11+N11)=0),3, - If this statement in true it will put a 3 in the cell<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
D17)) - If not whatever is in cell d17 will appear in the cell<o:p></o:p>
 
Upvote 0

Forum statistics

Threads
1,214,865
Messages
6,121,988
Members
449,060
Latest member
mtsheetz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top