Thread: IF
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default IF

Try

=IF(G7,IF(G7<15,"2 WKS",IF(AND(G7=15,G7<22),"3 WKS","")),"")

It wasn't clear from your original post whether 15 should return 2 WKS or 3
WKS (it is <=15 but also 14).

Hope this helps,

Hutch

"Connie Martin" wrote:

Thank you, Jacob, but what about incorporating "less than 22"?
IF(G715...this will capture every number above 15, which will mean, if I
understand correctly, it will include 37, for example. Also, 15....would
that exclude 15, which I do want to include? In a nutshell, for the "3 WKS",
I want to include only numbers from and including 15-21, therefore more than
14 but less than 22. Connie

"Jacob Skaria" wrote:

Try the below..

=IF(G7<=15,"2 WKS",IF(G715,"3 WKS",""))

'Handle blank entries in G7...
=IF(G7,IF(G7<=15,"2 WKS",IF(G715,"3 WKS","")),"")


If there are more comditions there are better ways to handle this..

--
Jacob


"Connie Martin" wrote:

I have this formula in one cell, dragged down through more than 800 rows and
it's working fine: =IF(G7<=15,"2 WKS",""). But, for the life of me, I can't
come up with the next one I want, which is IF G7 is more than 14 but less
than 22, return "3 WKS". I have checked online help and there's lots of help
there, but can't find this particular one. Connie