+ Reply to Thread
Results 1 to 10 of 10

IF Function

  1. #1
    Forum Contributor
    Join Date
    07-26-2006
    Posts
    141

    IF Function

    I need some help with an IF Function. I am need to setup an IF Function to cover several columns. I need the function to be able to look at Column A, B, C, and D and see if any are blank. If any of these is blank I need the function to give "Pending". If all of these columns have a Y then I need the function to give me "Completed".

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    See similar question, just answered

    http://www.excelforum.com/showthread...=1#post1839906
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    =IF(COUNTIF(A1:D1,"y")=4,"Complete","Pending")
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Forum Contributor
    Join Date
    07-26-2006
    Posts
    141

    IF Function

    That worked great. Is there any way to set the function up where it will not show "Pending" if there is nothing entered into that row?

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    =IF(COUNTBLANK(A1:D1)=4,"",IF(COUNTIF(A1:D1,"y")=4,"Complete","Pending"))
    VBA Noob

  6. #6
    Forum Contributor
    Join Date
    07-26-2006
    Posts
    141

    IF Function

    I tried IF(COUNTBLANK(A1:D1)=4,"",IF(COUNTIF(A1:D1,"y")=4 ,"Complete","Pending")) but I am still getting Pending on the blank row.

    I have another function I only want returned on the rows which have data. My function is =IF(I3<H3,IF(I3=0, "Repealed", "Decrease"),"Increase").

  7. #7
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    With your first one, you have probably got a space in one of the cells, because it should work. Select A1:D1 and hit the Delete key.

    For your second one, how about

    =IF(AND(H3="",I3=""),"",IF(I3<H3,IF(I3=0,"Repealed","Decrease"),"Increase"))

  8. #8
    Forum Contributor
    Join Date
    07-26-2006
    Posts
    141

    If Function

    For your second one, how about

    =IF(AND(H3="",I3=""),"",IF(I3<H3,IF(I3=0,"Repealed ","Decrease"),"Increase"))

    This work wonderfully, but I need to add another scenario (if possible). I need for it to be able to see all of the above plus if H3 is blank but I3 has a value then I need it to return "Enacted". Is there a way to maintain what I have and add this additional scenario?

  9. #9
    Forum Contributor
    Join Date
    07-26-2006
    Posts
    141

    If Function

    Nevermind my last question I figured it out. You guys have been a tremendous help as always.

  10. #10
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    We're always glad to assist - thanks for the feedback

+ 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