What's wrong with this formula? and how many If statements can I put to one cell?
=IF(D15=4*(AND(H15>2,H15<5)),"Recommended",""), IF(D15=4*(AND(H15>=5,H15<15),"Required","")
What's wrong with this formula? and how many If statements can I put to one cell?
=IF(D15=4*(AND(H15>2,H15<5)),"Recommended",""), IF(D15=4*(AND(H15>=5,H15<15),"Required","")
Last edited by arlu1201; 11-05-2012 at 12:29 PM. Reason: OP edited subsequent post.
There ya go...
The problem is the comma before the second IF, change it to a &, and you're set
commas are used to separate syntax within a given function, while an ampersand is used to string together two separate functions
Going for Guru! Click the Star to the bottom left of this post if I helped!
What are the conditions you are trying to put in?
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
Risk Assessment Template.xls
Thanks for the reply.
See attachment. Basically I am trying to populate Cell I15 with text dependant on the value in Cell D15 and the Class range it falls in to.
Gaz
OK. I have that working. Thanks.
Is there an umlimited amount of IF statements I can assign in this way? I have 11 to enter.
Perhaps![]()
=IF(D15=4,IF(AND(H15>2,H15<5),"Recommended",IF(AND(H15>=5,H15<15),"Required")),"")
Pepe, see previous reply with the attachement.
Ive got this working how I want using If statements. Thanks for the advice about the '&'.
=IF(D15=4*(AND(H15>2,H15<5)),"Recommended","")&IF(D15=4*(AND(H15>=5,H15<=15)),"Required","")&IF(D15=3*(AND(H15>=0,H15<5)),"None","")&IF(D15=3*(AND(H15>=5,H15<8)),"Recommended","")&IF(D15=3*(AND(H15>=8,H15<=15)),"Required","")&IF(D15=2*(AND(H15>=0,H15<8)),"None","")&IF(D15=2*(AND(H15>=8,H15<11)),"Recommended","")&IF(D15=2*(AND(H15>=11,H15<=15)),"Required","")&IF(D15=1*(AND(H15>=0,H15<11)),"None","")&IF(D15=1*(AND(H15>=11,H15<14)),"Recommended","")&IF(D15=1*(AND(H15>=14,H15<=15)),"Required","")
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks