ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF (https://www.excelbanter.com/excel-worksheet-functions/249771-if.html)

Connie Martin

IF
 
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

Jacob Skaria

IF
 
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


Glenn

IF
 
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


Your ranges don't exactly work...what do you want if G7=15? In your first
statement, G7<=15 would make the result "2 WKS", but in your second request,
G714 would make the result "3 WKS".

I would suggest that something like this would probably work, if you clarified
exactly what you want:

=MAX(INT((G7-1)/7)+1,2)&" WKS"

Connie Martin

IF
 
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


Tom Hutchins

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


Eduardo

IF
 
Hi,
=if(or(G714,G7<=22),"3Wks",if(G7<=14,"2Wks",""))

"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


Connie Martin

IF
 
I found what I'm looking for, which is: =IF(AND(G1414,G14<22),"3 WKS","").
I found it he http://www.techonthenet.com/excel/formulas/if.php, third
question down is very similar. Just needed a little tweaking. Connie

"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


David Biddulph[_2_]

IF
 
=IF(G7<15,"2 WKS",IF(G7<22,"3 WKS","")) ?
--
David Biddulph

"Connie Martin" wrote in message
...
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




David Biddulph[_2_]

IF
 
Why have you got (AND(G7=15, when you've already tested for G7<15, Tom ?

Wouldn't
=IF(G7,IF(G7<15,"2 WKS",IF(AND(G7=15,G7<22),"3 WKS","")),"")
be the same as
=IF(G7,IF(G7<15,"2 WKS",IF(G7<22,"3 WKS","")),"") ?
--
David Biddulph

"Tom Hutchins" wrote in message
...
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




David Biddulph[_2_]

IF
 
Three questions, Eduardo:

If you've tested for G714, why do you need G7<=14 subsequently?
You have a test for OR(G714,G7<=22); for what value of G7 would that be
anything other than TRUE?
Did you mean AND rather than OR?
--
David Biddulph


"Eduardo" wrote in message
...
Hi,
=if(or(G714,G7<=22),"3Wks",if(G7<=14,"2Wks",""))

"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




Connie Martin

IF
 
Thank you for responding, Tom. I'm sorry...I guess everyone found my
question "unclear" and I've re-read it and it seems clear to me. Anyway, I
did get the answer I needed. Thank you so much. Will try to be clearer the
next time. Connie

"Tom Hutchins" wrote:

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


Connie Martin

IF
 
This gives me 3 WKS for every single row. I guess, by the sounds of what
others wrote, I wasn't clear enough in what I wanted. See my other post in
the string. I did find what I was looking for finally. Thank you for
responding. Connie

"Eduardo" wrote:

Hi,
=if(or(G714,G7<=22),"3Wks",if(G7<=14,"2Wks",""))

"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


Connie Martin

IF
 
That's exactly it! Thank you. I was actually putting this in two separate
columns....that is, the 2 WKS formula in one and the 3 WKS formula in
another, but combined or separate, this works. Thank you very much. Connie

"David Biddulph" wrote:

=IF(G7<15,"2 WKS",IF(G7<22,"3 WKS","")) ?
--
David Biddulph

"Connie Martin" wrote in message
...
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



.


Rick Rothstein

IF
 
The confusion comes from your two conditions. Your first says G7<=15 (less
than or EQUAL TO) and your second says "G7 is more than 14"... both of these
conditions include the number 15 in them so it is unclear if you want 15 to
return "2 WKS" or "3 WKS".

--
Rick (MVP - Excel)


"Connie Martin" wrote in message
...
Thank you for responding, Tom. I'm sorry...I guess everyone found my
question "unclear" and I've re-read it and it seems clear to me. Anyway,
I
did get the answer I needed. Thank you so much. Will try to be clearer
the
next time. Connie

"Tom Hutchins" wrote:

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



Connie Martin

IF
 
I'm sorry if I wasn't too clear. I always try to be clear and precise when I
post here and I thought I was. Anyway, your formula works, except for it
adds "4 WKS" to numbers over 22, but how were you to know exactly what I
wanted?!! Sorry for the confusion. Perhaps I was a little too skimpy on my
info. Thanks again. Connie

"Glenn" wrote:

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


Your ranges don't exactly work...what do you want if G7=15? In your first
statement, G7<=15 would make the result "2 WKS", but in your second request,
G714 would make the result "3 WKS".

I would suggest that something like this would probably work, if you clarified
exactly what you want:

=MAX(INT((G7-1)/7)+1,2)&" WKS"
.


David Biddulph[_2_]

IF
 
Glad it helped.
--
David Biddulph

"Connie Martin" wrote in message
...
That's exactly it! Thank you. I was actually putting this in two
separate
columns....that is, the 2 WKS formula in one and the 3 WKS formula in
another, but combined or separate, this works. Thank you very much.
Connie

"David Biddulph" wrote:

=IF(G7<15,"2 WKS",IF(G7<22,"3 WKS","")) ?
--
David Biddulph

"Connie Martin" wrote in message
...
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



.





All times are GMT +1. The time now is 07:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com