#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default 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"
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default 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

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default 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



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default 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



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default 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





  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default 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

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default 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

  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default 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



.

  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default 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


  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default 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"
.



  #16   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default 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



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"