Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kim Kim is offline
external usenet poster
 
Posts: 284
Default nested if function

I am trying to create a formula in excel to call a result as either wild type
(WT), heterozygous (HET) or homozygous (HOM). This is how I was going about
it, but Excel tells me that I have too many arguments for this function. (The
value in cell W11 is based on a function).
=IF(W11<=0.05,"WT",IF(AND(0.48<=W11,W11<=0.6),"HET "),IF(W11=1,"HOM"))

Basically, I want it to give me the calls using the following ranges. If
you or someone else can suggest another approach (without use of a macro),
that would be greatly appreciated.

WT 0.00-0.05
HET 0.48-0.60
HOM 1.00-1.07

Optimally, it would be nice to have some comment, such as 'review' or
'out-of-range' for any value that didn't fall within the above ranges.

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 523
Default nested if function


=IF(W11<=0.05,"WT",IF(AND(0.48<=W11,W11<=0.6),"HET ",IF(W11=1,"HOM","")))

Or use Vlookup?

"kim" wrote:

I am trying to create a formula in excel to call a result as either wild type
(WT), heterozygous (HET) or homozygous (HOM). This is how I was going about
it, but Excel tells me that I have too many arguments for this function. (The
value in cell W11 is based on a function).
=IF(W11<=0.05,"WT",IF(AND(0.48<=W11,W11<=0.6),"HET "),IF(W11=1,"HOM"))

Basically, I want it to give me the calls using the following ranges. If
you or someone else can suggest another approach (without use of a macro),
that would be greatly appreciated.

WT 0.00-0.05
HET 0.48-0.60
HOM 1.00-1.07

Optimally, it would be nice to have some comment, such as 'review' or
'out-of-range' for any value that didn't fall within the above ranges.

Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default nested if function

Try the below

=IF(AND(W11=0,W11<=0.05),"WT",IF(AND(W11=0.48,W1 1<=0.6),"HET",IF(AND(W11=1,W11<=1.07),"HOM","Out of Range")))

'to handle blank entries in W11
=IF(W11="","",IF(AND(W11=0,W11<=0.05),"WT",IF(AND (W11=0.48,W11<=0.6),"HET",IF(AND(W11=1,W11<=1.07 ),"HOM","Out of Range"))))

If this post helps click Yes
---------------
Jacob Skaria


"kim" wrote:

I am trying to create a formula in excel to call a result as either wild type
(WT), heterozygous (HET) or homozygous (HOM). This is how I was going about
it, but Excel tells me that I have too many arguments for this function. (The
value in cell W11 is based on a function).
=IF(W11<=0.05,"WT",IF(AND(0.48<=W11,W11<=0.6),"HET "),IF(W11=1,"HOM"))

Basically, I want it to give me the calls using the following ranges. If
you or someone else can suggest another approach (without use of a macro),
that would be greatly appreciated.

WT 0.00-0.05
HET 0.48-0.60
HOM 1.00-1.07

Optimally, it would be nice to have some comment, such as 'review' or
'out-of-range' for any value that didn't fall within the above ranges.

Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default nested if function

Hi,
you have a ) in the wrong place

=IF(W11<=0.05,"WT",IF(AND(0.48<=W11,W11<=0.6),"HET ",IF(W11=1,"HOM")))

"kim" wrote:

I am trying to create a formula in excel to call a result as either wild type
(WT), heterozygous (HET) or homozygous (HOM). This is how I was going about
it, but Excel tells me that I have too many arguments for this function. (The
value in cell W11 is based on a function).
=IF(W11<=0.05,"WT",IF(AND(0.48<=W11,W11<=0.6),"HET "),IF(W11=1,"HOM"))

Basically, I want it to give me the calls using the following ranges. If
you or someone else can suggest another approach (without use of a macro),
that would be greatly appreciated.

WT 0.00-0.05
HET 0.48-0.60
HOM 1.00-1.07

Optimally, it would be nice to have some comment, such as 'review' or
'out-of-range' for any value that didn't fall within the above ranges.

Thank you.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,533
Default nested if function

Hi

This is a paranthesis problem!
Remove the closing paranthesis after "HET" and place it at the very end of
the line.

To get an 'Out of range' message use this (one line):

=IF(AND(W11=0,W11<=0.05),"WT",IF(AND(0.48<=W11,W1 1<=0.6),"HET",IF(AND(W11=1,W11<=1.7),"HOM","Out
of range")))


Regards,
Per

"kim" skrev i meddelelsen
...
I am trying to create a formula in excel to call a result as either wild
type
(WT), heterozygous (HET) or homozygous (HOM). This is how I was going
about
it, but Excel tells me that I have too many arguments for this function.
(The
value in cell W11 is based on a function).
=IF(W11<=0.05,"WT",IF(AND(0.48<=W11,W11<=0.6),"HET "),IF(W11=1,"HOM"))

Basically, I want it to give me the calls using the following ranges. If
you or someone else can suggest another approach (without use of a macro),
that would be greatly appreciated.

WT 0.00-0.05
HET 0.48-0.60
HOM 1.00-1.07

Optimally, it would be nice to have some comment, such as 'review' or
'out-of-range' for any value that didn't fall within the above ranges.

Thank you.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kim Kim is offline
external usenet poster
 
Posts: 284
Default nested if function

Thank you all for your responses. They all helped! It is great to have this
resource.

"kim" wrote:

I am trying to create a formula in excel to call a result as either wild type
(WT), heterozygous (HET) or homozygous (HOM). This is how I was going about
it, but Excel tells me that I have too many arguments for this function. (The
value in cell W11 is based on a function).
=IF(W11<=0.05,"WT",IF(AND(0.48<=W11,W11<=0.6),"HET "),IF(W11=1,"HOM"))

Basically, I want it to give me the calls using the following ranges. If
you or someone else can suggest another approach (without use of a macro),
that would be greatly appreciated.

WT 0.00-0.05
HET 0.48-0.60
HOM 1.00-1.07

Optimally, it would be nice to have some comment, such as 'review' or
'out-of-range' for any value that didn't fall within the above ranges.

Thank you.

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested IF function PWK Excel Worksheet Functions 12 December 19th 08 07:38 PM
IF and OR nested function Jon M Excel Discussion (Misc queries) 3 October 18th 08 02:49 PM
can you nested sum and round function within if function? anna Excel Worksheet Functions 4 May 27th 06 06:06 AM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


All times are GMT +1. The time now is 04:45 PM.

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"