Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Excel formual IF statement Help

I am trying to make this IF statement work

=IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4=" T"),B4,IF((A4="S"),C4,IF(
(A4="M"),C4,IF((A4="L"),C4,IF((A4="H"),C4,IF((A4=" G"),C4,IF((A4="C"),C4,"ERR")
)))))))

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Excel formual IF statement Help

On Sat, 01 May 2010 20:11:13 GMT, "Cerealkiller" <u59737@uwe wrote:

I am trying to make this IF statement work

=IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4= "T"),B4,IF((A4="S"),C4,IF(
(A4="M"),C4,IF((A4="L"),C4,IF((A4="H"),C4,IF((A4= "G"),C4,IF((A4="C"),C4,"ERR")
)))))))


It is helpful if you tell us what the problem is. Knowing that you apparently
cannot make this work is not very useful information when you don't tell us
either the version of Excel you are using, or what your function is doing
incorrectly.

Your formula, as written, does not have enough close parentheses at the end.

=IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4=" T"),B4,IF((A4="S"),C4,IF(
(A4="M"),C4,IF((A4="L"),C4,IF((A4="H"),C4,IF((A4=" G"),C4,IF((A4="C"),C4,"ERR")
)))))))))

seems to work perfectly OK on my computer. But I am using Excel 2007 which is
not limited to seven levels of nesting as are earlier versions of Excel. Also,
Excel should have corrected your formula.

Could it be that you are using an earlier version? If so, you will be limited
to seven nesting levels. That being the case, your formula can be simplified:

=IF(A4="",0,IF(OR(A4={"F","D","T"}),B4,
IF(OR(A4={"S","M","L","H","G","C"}),C4,"ERR")))

But if there is some other problem that you are concerned with, you'll need to
provide more detail.
--ron
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Excel formual IF statement Help

Thank you very much for you rapid response and it works very well. I am new
to OfficeKB so thank you for answering my question. I was not sure on how to
appropriately list questions and what information to add, but in the future I
will. I really do appreciate your help and hopefully if I have any other
questions or problems I would gladly accept any advice you can provide.

Ron Rosenfeld wrote:
I am trying to make this IF statement work

=IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4 ="T"),B4,IF((A4="S"),C4,IF(
(A4="M"),C4,IF((A4="L"),C4,IF((A4="H"),C4,IF((A4 ="G"),C4,IF((A4="C"),C4,"ERR")
)))))))


It is helpful if you tell us what the problem is. Knowing that you apparently
cannot make this work is not very useful information when you don't tell us
either the version of Excel you are using, or what your function is doing
incorrectly.

Your formula, as written, does not have enough close parentheses at the end.

=IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4= "T"),B4,IF((A4="S"),C4,IF(
(A4="M"),C4,IF((A4="L"),C4,IF((A4="H"),C4,IF((A4= "G"),C4,IF((A4="C"),C4,"ERR")
)))))))))

seems to work perfectly OK on my computer. But I am using Excel 2007 which is
not limited to seven levels of nesting as are earlier versions of Excel. Also,
Excel should have corrected your formula.

Could it be that you are using an earlier version? If so, you will be limited
to seven nesting levels. That being the case, your formula can be simplified:

=IF(A4="",0,IF(OR(A4={"F","D","T"}),B4,
IF(OR(A4={"S","M","L","H","G","C"}),C4,"ERR")))

But if there is some other problem that you are concerned with, you'll need to
provide more detail.
--ron


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Excel formual IF statement Help

You've got a rather unique/special circumstance here, and I think this is the
solution:
=IF(A4="",0,IF(ISERR(FIND(A4,"FDTSMLHGC")),"ERR",I F(FIND(A4,"FDTSMLHGC")<4,B4,C4)))

Mickey's right in stating that pre-2007, only 7 levels of nesting are
supported, but because in this setup you're only interested in evaluating the
contents of A4 and making the choice on that, and because 3 of those tests
result in a choice of B4, and 6 other results end with a choice of C4, we can
set it up as I've done above.

"Cerealkiller" wrote:

I am trying to make this IF statement work

=IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4=" T"),B4,IF((A4="S"),C4,IF(
(A4="M"),C4,IF((A4="L"),C4,IF((A4="H"),C4,IF((A4=" G"),C4,IF((A4="C"),C4,"ERR")
)))))))

.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Excel formual IF statement Help

Thank you for you alternate solution.

JLatham wrote:
You've got a rather unique/special circumstance here, and I think this is the
solution
=IF(A4="",0,IF(ISERR(FIND(A4,"FDTSMLHGC")),"ERR", IF(FIND(A4,"FDTSMLHGC")<4,B4,C4)))

Mickey's right in stating that pre-2007, only 7 levels of nesting are
supported, but because in this setup you're only interested in evaluating the
contents of A4 and making the choice on that, and because 3 of those tests
result in a choice of B4, and 6 other results end with a choice of C4, we can
set it up as I've done above.

I am trying to make this IF statement work

[quoted text clipped - 3 lines]

.




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Excel formual IF statement Help

Hi Ron, Thank you for you help I also have these following statements that I
am having trouble with.
I have Excel 2000 so these problems are more than 7 levels is there a way to
make them shorter. I did make a vlookup for them but if I have to move the
cell then I have to re reference that vlookup so I figured a formula would be
easier if it is possible. Thank you for any help that you can provide.



=IF(E4="",0,IF((E4="F"),8,IF((E4="D"),4,IF((E4="T" ),2,IF((E4="S"),1,IF(
(E4="M"),0,IF((E4="L"),-1,IF((E4="H"),-2,IF((E4="G"),-4,IF((E4="C"),-8,"ERR"))
))))))))

=IF(E4="",0,IF((E4="F"),8,IF((E4="D"),4,IF((E4="T" ),2,IF((E4="S"),1,IF(
(E4="M"),0,IF((E4="L"),1,IF((E4="H"),2,IF((E4="G") ,4,IF((E4="C"),8,"ERR"))))))
))))


Ron Rosenfeld wrote:
I am trying to make this IF statement work

=IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4 ="T"),B4,IF((A4="S"),C4,IF(
(A4="M"),C4,IF((A4="L"),C4,IF((A4="H"),C4,IF((A4 ="G"),C4,IF((A4="C"),C4,"ERR")
)))))))


It is helpful if you tell us what the problem is. Knowing that you apparently
cannot make this work is not very useful information when you don't tell us
either the version of Excel you are using, or what your function is doing
incorrectly.

Your formula, as written, does not have enough close parentheses at the end.

=IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4= "T"),B4,IF((A4="S"),C4,IF(
(A4="M"),C4,IF((A4="L"),C4,IF((A4="H"),C4,IF((A4= "G"),C4,IF((A4="C"),C4,"ERR")
)))))))))

seems to work perfectly OK on my computer. But I am using Excel 2007 which is
not limited to seven levels of nesting as are earlier versions of Excel. Also,
Excel should have corrected your formula.

Could it be that you are using an earlier version? If so, you will be limited
to seven nesting levels. That being the case, your formula can be simplified:

=IF(A4="",0,IF(OR(A4={"F","D","T"}),B4,
IF(OR(A4={"S","M","L","H","G","C"}),C4,"ERR")))

But if there is some other problem that you are concerned with, you'll need to
provide more detail.
--ron


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Excel formual IF statement Help

On Sat, 01 May 2010 22:20:56 GMT, "Cerealkiller" <u59737@uwe wrote:

Hi Ron, Thank you for you help I also have these following statements that I
am having trouble with.
I have Excel 2000 so these problems are more than 7 levels is there a way to
make them shorter. I did make a vlookup for them but if I have to move the
cell then I have to re reference that vlookup so I figured a formula would be
easier if it is possible. Thank you for any help that you can provide.



=IF(E4="",0,IF((E4="F"),8,IF((E4="D"),4,IF((E4="T "),2,IF((E4="S"),1,IF(
(E4="M"),0,IF((E4="L"),-1,IF((E4="H"),-2,IF((E4="G"),-4,IF((E4="C"),-8,"ERR"))
))))))))

=IF(E4="",0,IF((E4="F"),8,IF((E4="D"),4,IF((E4="T "),2,IF((E4="S"),1,IF(
(E4="M"),0,IF((E4="L"),1,IF((E4="H"),2,IF((E4="G" ),4,IF((E4="C"),8,"ERR"))))))
))))


Vlookup will be a better solution for this.

Just reference the table as an absolute reference, or NAME it.
--ron
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Excel formual IF statement Help

On Sat, 01 May 2010 21:07:04 GMT, "Cerealkiller" <u59737@uwe wrote:

Thank you very much for you rapid response and it works very well. I am new
to OfficeKB so thank you for answering my question. I was not sure on how to
appropriately list questions and what information to add, but in the future I
will. I really do appreciate your help and hopefully if I have any other
questions or problems I would gladly accept any advice you can provide.


Glad it worked. Thanks for the feedback.
--ron
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 89
Default Excel formual IF statement Help

Try this:

=IF(A4="",0,IF(OR(A4="F",A4="D",A4="T"),B4,IF(OR(A 4="S",A4="M",A4="L",A4="H",A4="G",IFA4="C"),C4,"ER R")))

Irie!

"Cerealkiller" wrote:

I am trying to make this IF statement work

=IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4=" T"),B4,IF((A4="S"),C4,IF(
(A4="M"),C4,IF((A4="L"),C4,IF((A4="H"),C4,IF((A4=" G"),C4,IF((A4="C"),C4,"ERR")
)))))))

.

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
New to Excel. Need help with formual Tom New Users to Excel 2 June 25th 07 04:50 PM
excel formual needed WYN Excel Discussion (Misc queries) 0 March 26th 06 11:46 PM
how do i use > or = to in a formual for excel Fast Eddie Excel Worksheet Functions 3 March 14th 05 01:11 AM
how do i use > or = to in a formual for excel Fast Eddie Excel Worksheet Functions 0 March 13th 05 07:57 PM
how do I up a percentage formual in excel elizabeth Excel Discussion (Misc queries) 1 January 12th 05 07:15 PM


All times are GMT +1. The time now is 12:56 PM.

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

About Us

"It's about Microsoft Excel"