+ Reply to Thread
Results 1 to 12 of 12

How to Make Nested IF's ?

  1. #1
    Registered User
    Join Date
    09-26-2011
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2002
    Posts
    63

    How to Make Nested IF's ?

    I made this formula but it is not exactly what I wanted
    =IF(LEFT(C314,4)="Groc",IF(E314="",-D314,0))

    I want to say: if column C has the string “Groc” and column E has nothing, put the value of D, but if column E has a value then put this value.

    To further explain, column C contains a string which assigns a transaction to a particular column, column E contains debits to my bank balance and column D contains cash payments.

    So if my payment is a debit payment (means column E has a value and column D has nothing) I want to record this payment but if it is a cash payment (means column E has nothing and column D has a value) then I want to record this payment.

    If I remember the formula I want it is called “nested IF’s” ?

    Thank you
    Last edited by oskar270; 09-28-2011 at 12:03 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: How to Make Nested IF's ?

    Nested IF's means that there are few IF function ...

    maybe this?

    =IF(LEFT(C314,4)="Groc",IF(E314="",D314,E314))

  3. #3
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: How to Make Nested IF's ?

    Maybe less IFs and more ANDs is what the doctor ordered:

    Please Login or Register  to view this content.
    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to Make Nested IF's ?

    I'll assume that if C doesn't have "groc" you'll want blank returned.

    =IF(LEFT(C314,4)="Groc",IF(E314="",D314,E314),"")
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: How to Make Nested IF's ?

    What if no Groc in C?

  6. #6
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: How to Make Nested IF's ?

    From the OP's statement "if column C has the string “Groc” and column E has nothing, put the value of D, but if column E has a value then put this value" then I believe that if all conditions are fullfilled then the value in Column D, but if not then Column E... unless of course he meant something else (in which I case I need to go to work )

    abousetta

  7. #7
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: How to Make Nested IF's ?

    Help me oskar270... the forum Gurus are after me... Save me...

  8. #8
    Registered User
    Join Date
    09-26-2011
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2002
    Posts
    63

    Re: How to Make Nested IF's ?

    Quote Originally Posted by abousetta View Post
    From the OP's statement "if column C has the string “Groc” and column E has nothing, put the value of D, but if column E has a value then put this value" then I believe that if all conditions are fullfilled then the value in Column D, but if not then Column E... unless of course he meant something else (in which I case I need to go to work )

    abousetta
    No I dont mean anything else, what you say is correct but I think the formula from "ChemistB" suits my needs best and that is what I try now

    Thank you all for the help

  9. #9
    Registered User
    Join Date
    09-26-2011
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2002
    Posts
    63

    Re: How to Make Nested IF's ?

    Quote Originally Posted by ChemistB View Post
    I'll assume that if C doesn't have "groc" you'll want blank returned.

    =IF(LEFT(C314,4)="Groc",IF(E314="",D314,E314),"")
    Thank you ChemistB for noticing my error,

    I forgot to mention that if C doesn't have "groc" I want blank returned. Your formula is simple and gives me what I want

    Thanks

  10. #10
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to Make Nested IF's ?

    "Simple" is my middle name. Glad to help

  11. #11
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: How to Make Nested IF's ?

    If you are satisfied with the responses, could you mark the thread as Solved.

    abousetta

  12. #12
    Registered User
    Join Date
    09-26-2011
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2002
    Posts
    63

    Re: How to Make Nested IF's ?

    Quote Originally Posted by abousetta View Post
    If you are satisfied with the responses, could you mark the thread as Solved.

    abousetta
    Dont know how to mark the thread solved but noticed in another thread it was written like that.

    Thank you all SOLVED

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1