+ Reply to Thread
Results 1 to 3 of 3

Problems to combine IF, AND, ISBLANK and COUNTIF - pls help!

  1. #1
    Registered User
    Join Date
    04-13-2013
    Location
    Geneva, Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    29

    Problems to combine IF, AND, ISBLANK and COUNTIF - pls help!

    Hi folks,

    I have tried back and forth, but can't get the formula together...

    This are some of my trials...

    =IF(AND(ISBLANK(L6:L30)),IF(COUNTIF($B$6:$B$30,"Other expenses"),"Specify other expenses!",""))

    =IF(COUNTIF($B$6:$B$30,"Other expenses"),IF(ISBLANK(L6:L30),"Specify other expenses!",""),"Specify other expenses!","")

    What I want the cell O5 to do is this:
    1. Check if any cell in the range B6:B30 contains the text "Other expenses"
    2. If so, check cell range L6:L30 and return the text "Specify other expenses" in case the matching cell is empty (matching cell meaning if B8 contains "Other expenses" than L8 should be checked if empty or not)
    3. When the matching cell in range L6:L30 has text input (whatever text), cell O5 is to return empty

    Basically this is no true or false issue, but a conditional check of user input. Do I make any sense?


    Thanks for your help!

    Regards,
    Kim

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Problems to combine IF, AND, ISBLANK and COUNTIF - pls help!

    hi Kim, something like this?
    =IF(COUNTIFS(B6:B30,"*Other expenses*",L6:L30,""),"Specify other expenses","")

    you mentioned "contains Other expenses", so i included the asterisk. if you want it to be exactly "Other expenses" & not include others like "all other expenses", then:
    =IF(COUNTIFS(B6:B30,"Other expenses",L6:L30,""),"Specify other expenses","")

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    04-13-2013
    Location
    Geneva, Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Problems to combine IF, AND, ISBLANK and COUNTIF - pls help!

    Genuis! Thank you very much! The formula does exactly what t should do.

    I love this forum.

    Greetings to Singapore,
    Kim

+ 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